Remove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServer
authorUlf Hermann <ulf.hermann@theqtcompany.com>
Tue, 14 Jul 2015 16:37:44 +0000 (18:37 +0200)
committerUlf Hermann <ulf.hermann@theqtcompany.com>
Tue, 4 Aug 2015 13:34:43 +0000 (13:34 +0000)
Plugins in qmltooling won't get built if that is set.

Change-Id: Ideced675064e74ccb78b9ac8c8fff2536150810c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp

index 83724f26070ee3a408572b9b22d0476c986abf45..af77e6875b0fe3848bded060754304e8cc782d37 100644 (file)
@@ -48,7 +48,7 @@
 #include <private/qobject_p.h>
 #include <private/qcoreapplication_p.h>
 
-#if defined(QT_STATIC) && !defined(QT_NO_QML_DEBUGGER) && !defined(QT_NO_LIBRARY)
+#if defined(QT_STATIC) && !defined(QT_NO_LIBRARY)
 #include "../../plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h"
 #endif
 
@@ -309,7 +309,7 @@ QQmlDebugServerConnection *QQmlDebugServerImpl::loadConnectionPlugin(const QStri
 void QQmlDebugServerThread::run()
 {
     Q_ASSERT_X(m_server != 0, Q_FUNC_INFO, "There should always be a debug server available here.");
-#if defined(QT_STATIC) && !defined(QT_NO_QML_DEBUGGER) && !defined(QT_NO_LIBRARY)
+#if defined(QT_STATIC) && !defined(QT_NO_LIBRARY)
     QQmlDebugServerConnection *connection
             = new QTcpServerConnection;
 #else
@@ -420,7 +420,6 @@ bool QQmlDebugServerImpl::enableFromArguments()
 {
     // format: qmljsdebugger=port:<port_from>[,port_to],host:<ip address>][,block]
     const QString args = commandLineArguments();
-#ifndef QT_NO_QML_DEBUGGER
     if (args.isEmpty())
         return false; // Manual initialization, through QQmlDebugServer::open()
 
@@ -476,13 +475,6 @@ bool QQmlDebugServerImpl::enableFromArguments()
                                           "Format is qmljsdebugger=port:<port_from>[,port_to],host:"
                                           "<ip address>][,block]").arg(args);
     }
-#else
-    if (!args.isEmpty()) {
-        qWarning() << QString(QLatin1String(
-                     "QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
-                     "QtQml is not configured for debugging.")).arg(args);
-    }
-#endif
     return false;
 }
 
@@ -742,7 +734,6 @@ void QQmlDebugServerImpl::sendMessages(const QString &name, const QList<QByteArr
 template<class Action>
 bool QQmlDebugServerImpl::enable(Action action)
 {
-#ifndef QT_NO_QML_DEBUGGER
     if (m_thread)
         return false;
     if (!action(this))
@@ -753,10 +744,6 @@ bool QQmlDebugServerImpl::enable(Action action)
     if (m_blockingMode && !m_gotHello)
         m_helloCondition.wait(&m_helloMutex); // wait for hello
     return true;
-#else
-    Q_UNUSED(action);
-    return false;
-#endif
 }
 
 void QQmlDebugServerImpl::wakeEngine(QQmlEngine *engine)