aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qdebugmessageservice_p.h4
-rw-r--r--src/qml/debugger/qqmldebug.h4
-rw-r--r--src/qml/debugger/qqmldebugserver.cpp37
-rw-r--r--src/qml/debugger/qqmldebugserver_p.h4
-rw-r--r--src/qml/debugger/qqmldebugserverconnection_p.h6
-rw-r--r--src/qml/debugger/qqmldebugservice_p.h4
-rw-r--r--src/qml/debugger/qqmldebugservice_p_p.h4
-rw-r--r--src/qml/debugger/qqmldebugstatesdelegate_p.h4
-rw-r--r--src/qml/debugger/qqmlinspectorinterface_p.h4
-rw-r--r--src/qml/debugger/qqmlinspectorservice_p.h4
-rw-r--r--src/qml/debugger/qqmlprofilerservice_p.h4
-rw-r--r--src/qml/debugger/qv8debugservice_p.h4
-rw-r--r--src/qml/debugger/qv8profilerservice_p.h4
13 files changed, 27 insertions, 60 deletions
diff --git a/src/qml/debugger/qdebugmessageservice_p.h b/src/qml/debugger/qdebugmessageservice_p.h
index 911f9fe3ed..dbd05646c9 100644
--- a/src/qml/debugger/qdebugmessageservice_p.h
+++ b/src/qml/debugger/qdebugmessageservice_p.h
@@ -57,8 +57,6 @@
#include <QtCore/qlogging.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QDebugMessageServicePrivate;
@@ -84,6 +82,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDEBUGMESSAGESERVICE_P_H
diff --git a/src/qml/debugger/qqmldebug.h b/src/qml/debugger/qqmldebug.h
index 3232f6bb6f..d2b0220bc6 100644
--- a/src/qml/debugger/qqmldebug.h
+++ b/src/qml/debugger/qqmldebug.h
@@ -44,8 +44,6 @@
#include <QtQml/qtqmlglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -63,6 +61,4 @@ static QQmlDebuggingEnabler qmlEnableDebuggingHelper(true);
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUG_H
diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp
index 7c9928c43c..27e3d226cd 100644
--- a/src/qml/debugger/qqmldebugserver.cpp
+++ b/src/qml/debugger/qqmldebugserver.cpp
@@ -123,8 +123,9 @@ public:
m_pluginName = pluginName;
}
- void setPort(int port, bool block, QString &hostAddress) {
- m_port = port;
+ void setPortRange(int portFrom, int portTo, bool block, QString &hostAddress) {
+ m_portFrom = portFrom;
+ m_portTo = portTo;
m_block = block;
m_hostAddress = hostAddress;
}
@@ -133,7 +134,8 @@ public:
private:
QString m_pluginName;
- int m_port;
+ int m_portFrom;
+ int m_portTo;
bool m_block;
QString m_hostAddress;
};
@@ -225,7 +227,7 @@ void QQmlDebugServerThread::run()
= server->d_func()->loadConnectionPlugin(m_pluginName);
if (connection) {
connection->setServer(QQmlDebugServer::instance());
- connection->setPort(m_port, m_block, m_hostAddress);
+ connection->setPortRange(m_portFrom, m_portTo, m_block, m_hostAddress);
} else {
QCoreApplicationPrivate *appD = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp));
qWarning() << QString(QLatin1String("QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
@@ -272,12 +274,13 @@ QQmlDebugServer *QQmlDebugServer::instance()
QCoreApplicationPrivate *appD = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp));
#ifndef QT_QML_NO_DEBUGGER
// ### remove port definition when protocol is changed
- int port = 0;
+ int portFrom = 0;
+ int portTo = 0;
bool block = false;
bool ok = false;
QString hostAddress;
- // format: qmljsdebugger=port:3768[,host:<ip address>][,block] OR qmljsdebugger=ost[,block]
+ // format: qmljsdebugger=port:<port_from>[,port_to],host:<ip address>][,block]
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
if (!QQmlEnginePrivate::qml_debugging_enabled) {
qWarning() << QString(QLatin1String(
@@ -290,9 +293,21 @@ QQmlDebugServer *QQmlDebugServer::instance()
QString pluginName;
QStringList lstjsDebugArguments = appD->qmljsDebugArgumentsString()
.split(QLatin1Char(','));
- foreach (const QString &strArgument, lstjsDebugArguments) {
+ QStringList::const_iterator argsItEnd = lstjsDebugArguments.end();
+ QStringList::const_iterator argsIt = lstjsDebugArguments.begin();
+ for (; argsIt != argsItEnd; ++argsIt) {
+ const QString strArgument = *argsIt;
if (strArgument.startsWith(QLatin1String("port:"))) {
- port = strArgument.mid(5).toInt(&ok);
+ portFrom = strArgument.mid(5).toInt(&ok);
+ portTo = portFrom;
+ QStringList::const_iterator argsNext = argsIt + 1;
+ if (argsNext == argsItEnd)
+ break;
+ const QString nextArgument = *argsNext;
+ if (ok && nextArgument.contains(QRegExp(QStringLiteral("^\\s*\\d+\\s*$")))) {
+ portTo = nextArgument.toInt(&ok);
+ ++argsIt;
+ }
pluginName = QLatin1String("qmldbg_tcp");
} else if (strArgument.startsWith(QLatin1String("host:"))) {
hostAddress = strArgument.mid(5);
@@ -311,7 +326,7 @@ QQmlDebugServer *QQmlDebugServer::instance()
qQmlDebugServer->d_func()->thread = thread;
qQmlDebugServer->moveToThread(thread);
thread->setPluginName(pluginName);
- thread->setPort(port, block, hostAddress);
+ thread->setPortRange(portFrom, portTo, block, hostAddress);
QQmlDebugServerPrivate *d = qQmlDebugServer->d_func();
d->blockingMode = block;
@@ -325,8 +340,8 @@ QQmlDebugServer *QQmlDebugServer::instance()
} else {
qWarning() << QString(QLatin1String(
"QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
- "Format is -qmljsdebugger=port:<port>[,block]")).arg(
- appD->qmljsDebugArgumentsString());
+ "Format is qmljsdebugger=port:<port_from>[,port_to],host:"
+ "<ip address>][,block]")).arg(appD->qmljsDebugArgumentsString());
}
}
#else
diff --git a/src/qml/debugger/qqmldebugserver_p.h b/src/qml/debugger/qqmldebugserver_p.h
index d38b1d0147..27d54d6947 100644
--- a/src/qml/debugger/qqmldebugserver_p.h
+++ b/src/qml/debugger/qqmldebugserver_p.h
@@ -57,8 +57,6 @@
// We mean it.
//
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -104,6 +102,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUGSERVICE_H
diff --git a/src/qml/debugger/qqmldebugserverconnection_p.h b/src/qml/debugger/qqmldebugserverconnection_p.h
index a622855071..a7c35c2d2f 100644
--- a/src/qml/debugger/qqmldebugserverconnection_p.h
+++ b/src/qml/debugger/qqmldebugserverconnection_p.h
@@ -56,8 +56,6 @@
// We mean it.
//
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -69,7 +67,7 @@ public:
virtual ~QQmlDebugServerConnection() {}
virtual void setServer(QQmlDebugServer *server) = 0;
- virtual void setPort(int port, bool bock, const QString &hostaddress) = 0;
+ virtual void setPortRange(int portFrom, int portTo, bool bock, const QString &hostaddress) = 0;
virtual bool isConnected() const = 0;
virtual void send(const QList<QByteArray> &messages) = 0;
virtual void disconnect() = 0;
@@ -82,6 +80,4 @@ Q_DECLARE_INTERFACE(QQmlDebugServerConnection, QQmlDebugServerConnection_iid)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUGSERVERCONNECTION_H
diff --git a/src/qml/debugger/qqmldebugservice_p.h b/src/qml/debugger/qqmldebugservice_p.h
index 3e7b2f11f3..71a116f6a5 100644
--- a/src/qml/debugger/qqmldebugservice_p.h
+++ b/src/qml/debugger/qqmldebugservice_p.h
@@ -58,8 +58,6 @@
// We mean it.
//
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -121,7 +119,5 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUGSERVICE_H
diff --git a/src/qml/debugger/qqmldebugservice_p_p.h b/src/qml/debugger/qqmldebugservice_p_p.h
index f81a8285eb..940990f628 100644
--- a/src/qml/debugger/qqmldebugservice_p_p.h
+++ b/src/qml/debugger/qqmldebugservice_p_p.h
@@ -56,8 +56,6 @@
#include <QtCore/qglobal.h>
#include <private/qobject_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -77,6 +75,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUGSERVICE_P_H
diff --git a/src/qml/debugger/qqmldebugstatesdelegate_p.h b/src/qml/debugger/qqmldebugstatesdelegate_p.h
index 8beb4303de..7197b8cc3b 100644
--- a/src/qml/debugger/qqmldebugstatesdelegate_p.h
+++ b/src/qml/debugger/qqmldebugstatesdelegate_p.h
@@ -57,8 +57,6 @@
#include <QtCore/QList>
#include <QtCore/QPointer>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -96,6 +94,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLDEBUGSTATESDELEGATE_P_H
diff --git a/src/qml/debugger/qqmlinspectorinterface_p.h b/src/qml/debugger/qqmlinspectorinterface_p.h
index 1bc25937e9..0b4020c4a7 100644
--- a/src/qml/debugger/qqmlinspectorinterface_p.h
+++ b/src/qml/debugger/qqmlinspectorinterface_p.h
@@ -56,8 +56,6 @@
#include <QtQml/qtqmlglobal.h>
#include <private/qqmlglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -81,6 +79,4 @@ Q_DECLARE_INTERFACE(QQmlInspectorInterface, QQmlInspectorInterface_iid)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLINSPECTORINTERFACE_H
diff --git a/src/qml/debugger/qqmlinspectorservice_p.h b/src/qml/debugger/qqmlinspectorservice_p.h
index de97e1798d..f8b2a39240 100644
--- a/src/qml/debugger/qqmlinspectorservice_p.h
+++ b/src/qml/debugger/qqmlinspectorservice_p.h
@@ -58,8 +58,6 @@
#include <QtQml/qtqmlglobal.h>
#include <QtCore/QList>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -96,6 +94,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLINSPECTORSERVICE_H
diff --git a/src/qml/debugger/qqmlprofilerservice_p.h b/src/qml/debugger/qqmlprofilerservice_p.h
index d5443aaef6..a50fb5ea08 100644
--- a/src/qml/debugger/qqmlprofilerservice_p.h
+++ b/src/qml/debugger/qqmlprofilerservice_p.h
@@ -64,8 +64,6 @@
#include <QtCore/qwaitcondition.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
struct Q_AUTOTEST_EXPORT QQmlProfilerData
@@ -292,7 +290,5 @@ struct QQmlCompilingProfiler {
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QQMLPROFILERSERVICE_P_H
diff --git a/src/qml/debugger/qv8debugservice_p.h b/src/qml/debugger/qv8debugservice_p.h
index c93948c402..00ecf557c3 100644
--- a/src/qml/debugger/qv8debugservice_p.h
+++ b/src/qml/debugger/qv8debugservice_p.h
@@ -56,8 +56,6 @@
#include "qqmldebugservice_p.h"
#include <private/qv8debug_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -100,6 +98,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QV8DEBUGSERVICE_P_H
diff --git a/src/qml/debugger/qv8profilerservice_p.h b/src/qml/debugger/qv8profilerservice_p.h
index 6a8c1e8c3b..10906442f5 100644
--- a/src/qml/debugger/qv8profilerservice_p.h
+++ b/src/qml/debugger/qv8profilerservice_p.h
@@ -55,8 +55,6 @@
#include <private/qqmldebugservice_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -115,6 +113,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QV8PROFILERSERVICE_P_H