diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2012-03-26 18:55:58 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-20 16:32:24 (GMT) |
commit | 8599a0e6397391634ee52197e164f6b7121f9a4d (patch) | |
tree | 16a88bbe99f83ec30358e107cfb20004a395ed19 /src/declarative | |
parent | 2e897ab99413bb1e4fd3f057f431785e3ac7abb0 (diff) | |
download | Qt-8599a0e6397391634ee52197e164f6b7121f9a4d.zip Qt-8599a0e6397391634ee52197e164f6b7121f9a4d.tar.gz Qt-8599a0e6397391634ee52197e164f6b7121f9a4d.tar.bz2 |
Moved qmljs_debug_arguments to QCoreApplication
Enable the use of the QML debugger without QtGUI
Based on Qt5's 9a096d9e.
Change-Id: If97502bc5367e0faadfaf3bbe70b0c89ef2c75c2
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugserver.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index c664f96..67fd36b 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -49,7 +49,7 @@ #include <QtCore/QStringList> #include <private/qobject_p.h> -#include <private/qapplication_p.h> +#include <private/qcoreapplication_p.h> QT_BEGIN_NAMESPACE @@ -169,7 +169,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() if (!commandLineTested) { commandLineTested = true; - QApplicationPrivate *appD = static_cast<QApplicationPrivate*>(QObjectPrivate::get(qApp)); + QCoreApplicationPrivate *appD = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp)); #ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL // ### remove port definition when protocol is changed int port = 0; @@ -177,26 +177,26 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() bool ok = false; // format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block] - if (!appD->qmljsDebugArgumentsString().isEmpty()) { + if (!appD->qmljsDebugArguments().isEmpty()) { if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { qWarning() << QString::fromLatin1( "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Debugging has not been enabled.").arg( - appD->qmljsDebugArgumentsString()); + appD->qmljsDebugArguments()); return 0; } QString pluginName; - if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { - int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); - port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); + if (appD->qmljsDebugArguments().indexOf(QLatin1String("port:")) == 0) { + int separatorIndex = appD->qmljsDebugArguments().indexOf(QLatin1Char(',')); + port = appD->qmljsDebugArguments().mid(5, separatorIndex - 5).toInt(&ok); pluginName = QLatin1String("qmldbg_tcp"); - } else if (appD->qmljsDebugArgumentsString().contains(QLatin1String("ost"))) { + } else if (appD->qmljsDebugArguments().contains(QLatin1String("ost"))) { pluginName = QLatin1String("qmldbg_ost"); ok = true; } - block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); + block = appD->qmljsDebugArguments().contains(QLatin1String("block")); if (ok) { server = new QDeclarativeDebugServer(); @@ -213,22 +213,22 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() qWarning() << QString::fromLatin1( "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Remote debugger plugin has not been found.").arg( - appD->qmljsDebugArgumentsString()); + appD->qmljsDebugArguments()); } } else { qWarning() << QString::fromLatin1( "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:<port>[,block]").arg( - appD->qmljsDebugArgumentsString()); + appD->qmljsDebugArguments()); } } #else - if (!appD->qmljsDebugArgumentsString().isEmpty()) { + if (!appD->qmljsDebugArguments().isEmpty()) { qWarning() << QString::fromLatin1( "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "QtDeclarative is not configured for debugging.").arg( - appD->qmljsDebugArgumentsString()); + appD->qmljsDebugArguments()); } #endif } |