summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-05-10 15:14:16 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-05-10 15:14:16 +0200
commitbaecfbc7f7e0ec7edddb74a2e760c685977e9084 (patch)
treef9071063e3b8dfcc1b2fcb3236be84fce5b17091 /src/declarative/debugger
parentbde58ad1e7d2b38d2882aaf869e93b0415128836 (diff)
parentf3ddd2d995b7485cdc1c3420d254499904ff9dd9 (diff)
Merge remote branch 'qt/4.8' into master-qml-staging
Conflicts: src/declarative/debugger/qdeclarativedebugserver.cpp src/plugins/qmltooling/qmltooling.pro
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp
index 34ba5205d4..4343870f09 100644
--- a/src/declarative/debugger/qdeclarativedebugserver.cpp
+++ b/src/declarative/debugger/qdeclarativedebugserver.cpp
@@ -95,7 +95,7 @@ public:
private:
// private slot
void _q_deliverMessage(const QString &serviceName, const QByteArray &message);
- static QDeclarativeDebugServerConnection *loadConnectionPlugin();
+ static QDeclarativeDebugServerConnection *loadConnectionPlugin(const QString &pluginName);
};
QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() :
@@ -117,8 +117,10 @@ void QDeclarativeDebugServerPrivate::advertisePlugins()
connection->send(message);
}
-QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin()
+QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin(
+ const QString &pluginName)
{
+#ifndef QT_NO_LIBRARY
QStringList pluginCandidates;
const QStringList paths = QCoreApplication::libraryPaths();
foreach (const QString &libPath, paths) {
@@ -126,7 +128,8 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio
if (dir.exists()) {
QStringList plugins(dir.entryList(QDir::Files));
foreach (const QString &pluginPath, plugins) {
- pluginCandidates << dir.absoluteFilePath(pluginPath);
+ if (QFileInfo(pluginPath).fileName().contains(pluginName))
+ pluginCandidates << dir.absoluteFilePath(pluginPath);
}
}
}
@@ -144,6 +147,7 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio
return connection;
loader.unload();
}
+#endif
return 0;
}
@@ -170,7 +174,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
bool block = false;
bool ok = false;
- // format: qmljsdebugger=port:3768[,block]
+ // format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block]
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
const QString message =
@@ -181,24 +185,30 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
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);
+ pluginName = QLatin1String("qmldbg_tcp");
+ } else if (appD->qmljsDebugArgumentsString().contains(QLatin1String("ost"))) {
+ pluginName = QLatin1String("qmldbg_ost");
+ ok = true;
}
+
block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block"));
if (ok) {
server = new QDeclarativeDebugServer();
QDeclarativeDebugServerConnection *connection
- = QDeclarativeDebugServerPrivate::loadConnectionPlugin();
+ = QDeclarativeDebugServerPrivate::loadConnectionPlugin(pluginName);
if (connection) {
server->d_func()->connection = connection;
connection->setServer(server);
connection->setPort(port, block);
} else {
- qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring\"-qmljsdebugger=%1\". "
+ qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
"Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString());
}