Debugger: Simplify QmlEngine construction

Change-Id: Id237998cf2d9a03f9c2929043fdb45ac49d4addb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-26 16:24:05 +02:00
parent a6d12177ad
commit 9f3e104e37
5 changed files with 19 additions and 19 deletions

View File

@@ -245,7 +245,7 @@ static void updateDocument(IDocument *document, const QTextDocument *textDocumen
//
///////////////////////////////////////////////////////////////////////
QmlEngine::QmlEngine(bool useTerminal)
QmlEngine::QmlEngine()
: d(new QmlEnginePrivate(this, new QmlDebugConnection(this)))
{
setObjectName("QmlEngine");
@@ -265,12 +265,6 @@ QmlEngine::QmlEngine(bool useTerminal)
connect(&d->applicationLauncher, &ApplicationLauncher::processStarted,
this, &QmlEngine::handleLauncherStarted);
// we won't get any debug output
if (useTerminal) {
d->retryOnConnectFail = true;
d->automaticConnect = true;
}
debuggerConsole()->setScriptEvaluator([this](const QString &expr) {
executeDebuggerCommand(expr, QmlLanguage);
});
@@ -521,6 +515,12 @@ void QmlEngine::closeConnection()
void QmlEngine::runEngine()
{
// we won't get any debug output
if (!terminal()) {
d->retryOnConnectFail = true;
d->automaticConnect = true;
}
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
if (!isSlaveEngine()) {
@@ -2480,9 +2480,9 @@ void QmlEnginePrivate::flushSendBuffer()
sendBuffer.clear();
}
DebuggerEngine *createQmlEngine(bool useTerminal)
DebuggerEngine *createQmlEngine()
{
return new QmlEngine(useTerminal);
return new QmlEngine;
}
} // Internal