Commit 4930fbcc authored by Aurindam Jana's avatar Aurindam Jana

QML Debugging: Qt 5 CONFIG+=declarative_debug qml_debug

Pass both arguments to qmake. The assumption being that most
projects will not mix both Qt Quick 1 and Qt Quick 2. In the
case of others, debugging will be enabled only for the first
debugging client that is enabled. This is inline with the
current behaviour where debugging multiple engines is not
supported.

Change-Id: I90cd6c6ff559a3a7519ee3ee10690c0e8135c97b
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent cab6ed5e
......@@ -251,7 +251,8 @@ void QmlInspectorAdapter::engineClientStatusChanged(QmlDebug::ClientStatus statu
BaseEngineDebugClient *client
= qobject_cast<BaseEngineDebugClient*>(sender());
if (status == QmlDebug::Enabled) {
if (status == QmlDebug::Enabled && !m_engineClientConnected) {
// We accept the first client that is enabled and reject the others.
QTC_ASSERT(client, return);
setActiveEngineClient(client);
} else if (m_engineClientConnected && client == m_engineClient) {
......
......@@ -201,9 +201,12 @@ QStringList QMakeStep::deducedArguments()
if (!version->needsQmlDebuggingLibrary()) {
// This Qt version has the QML debugging services built in, however
// they still need to be enabled at compile time
arguments << (version->qtVersion().majorVersion >= 5 ?
QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG5) :
QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG4));
// TODO: For Qt5, we can pass both arguments as there can be Qt Quick 1/2 projects.
// Currently there is no support for debugging multiple engines.
arguments << QLatin1String(Constants::QMAKEVAR_QUICK1_DEBUG);
if (version->qtVersion().majorVersion >= 5) {
arguments << QLatin1String(Constants::QMAKEVAR_QUICK2_DEBUG);
}
} else {
const QString qmlDebuggingHelperLibrary = version->qmlDebuggingHelperLibrary(true);
if (!qmlDebuggingHelperLibrary.isEmpty()) {
......
......@@ -436,8 +436,8 @@ bool Qt4BuildConfiguration::removeQMLInspectorFromArguments(QString *args)
for (Utils::QtcProcess::ArgIterator ait(args); ait.next(); ) {
const QString arg = ait.value();
if (arg.contains(QLatin1String(Constants::QMAKEVAR_QMLJSDEBUGGER_PATH))
|| arg.contains(QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG4))
|| arg.contains(QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG5))) {
|| arg.contains(QLatin1String(Constants::QMAKEVAR_QUICK1_DEBUG))
|| arg.contains(QLatin1String(Constants::QMAKEVAR_QUICK2_DEBUG))) {
ait.deleteArg();
removedArgument = true;
}
......
......@@ -89,8 +89,8 @@ const char ICON_HTML5_APP[] = ":/wizards/images/html5app.png";
// Env variables
const char QMAKEVAR_QMLJSDEBUGGER_PATH[] = "QMLJSDEBUGGER_PATH";
const char QMAKEVAR_DECLARATIVE_DEBUG4[] = "CONFIG+=declarative_debug";
const char QMAKEVAR_DECLARATIVE_DEBUG5[] = "CONFIG+=qml_debug";
const char QMAKEVAR_QUICK1_DEBUG[] = "CONFIG+=declarative_debug";
const char QMAKEVAR_QUICK2_DEBUG[] = "CONFIG+=qml_debug";
// Unconfigured Panel
const char UNCONFIGURED_PANEL_PAGE_ID[] = "UnconfiguredPanel";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment