diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-04-05 14:39:52 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-04-06 09:43:46 (GMT) |
commit | 7545deafbe6aa996aa9c3ec7297a312692b22ff4 (patch) | |
tree | 1c0a756ed85a482310447680e468946c642aab3d /src | |
parent | 160f1867868cdea916923652b00484ed11f90aaa (diff) | |
download | Qt-7545deafbe6aa996aa9c3ec7297a312692b22ff4.zip Qt-7545deafbe6aa996aa9c3ec7297a312692b22ff4.tar.gz Qt-7545deafbe6aa996aa9c3ec7297a312692b22ff4.tar.bz2 |
QDeclarativeDebug: Warn user for Qt configured with -no-declarative-debug
Print a warning if the user passes -qmljsdebugger on command line, but
Qt is configured with -no-declarative-debug
Change-Id: I72c9ffad9631ffe8582c13e3a4e798b102d0efad
Reviewed-by: Christiaan Janssen
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebughelper.cpp | 2 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugserver.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp index 0478209..93f7423 100644 --- a/src/declarative/debugger/qdeclarativedebughelper.cpp +++ b/src/declarative/debugger/qdeclarativedebughelper.cpp @@ -65,10 +65,12 @@ void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor) } void QDeclarativeDebugHelper::enableDebugging() { +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { qWarning("Qml debugging is enabled. Only use this in a safe environment!"); } QDeclarativeEnginePrivate::qml_debugging_enabled = true; +#endif } QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index ea3d9a3..14e7187 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -159,8 +159,8 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() if (!commandLineTested) { commandLineTested = true; -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL QApplicationPrivate *appD = static_cast<QApplicationPrivate*>(QObjectPrivate::get(qApp)); +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL // ### remove port definition when protocol is changed int port = 0; bool block = false; @@ -204,6 +204,12 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() appD->qmljsDebugArgumentsString()).toAscii().constData()); } } +#else + if (!appD->qmljsDebugArgumentsString().isEmpty()) { + qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QtDeclarative is not configured for debugging.").arg( + appD->qmljsDebugArgumentsString()).toAscii().constData()); + } #endif } |