2010-08-13 14:18:10 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2010-08-13 14:18:10 +02:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2010-08-13 14:18:10 +02:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2010-08-13 14:18:10 +02:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2010-08-13 14:18:10 +02:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "qmladapter.h"
|
2011-01-10 10:14:23 +01:00
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
#include "qscriptdebuggerclient.h"
|
|
|
|
|
#include "qmlv8debuggerclient.h"
|
2010-08-13 14:18:10 +02:00
|
|
|
#include "qmljsprivateapi.h"
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
#include "qmlengine.h"
|
2010-08-13 14:18:10 +02:00
|
|
|
|
2011-07-28 17:04:35 +02:00
|
|
|
#include <extensionsystem/pluginmanager.h>
|
|
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2011-12-20 16:12:38 +01:00
|
|
|
#include <qmljsdebugclient/qdebugmessageclient.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QTimer>
|
|
|
|
|
#include <QDebug>
|
2012-02-21 15:47:55 +01:00
|
|
|
#include <QWeakPointer>
|
2010-08-13 14:18:10 +02:00
|
|
|
|
|
|
|
|
namespace Debugger {
|
2011-01-12 13:51:26 +01:00
|
|
|
namespace Internal {
|
2010-09-13 13:30:35 +02:00
|
|
|
|
2011-01-12 13:51:26 +01:00
|
|
|
class QmlAdapterPrivate
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit QmlAdapterPrivate(DebuggerEngine *engine)
|
|
|
|
|
: m_engine(engine)
|
|
|
|
|
, m_qmlClient(0)
|
2011-10-06 17:38:28 +02:00
|
|
|
, m_engineDebugClient(0)
|
2011-01-12 13:51:26 +01:00
|
|
|
, m_conn(0)
|
2011-10-06 17:38:28 +02:00
|
|
|
, m_currentSelectedDebugId(-1)
|
2011-12-20 16:12:38 +01:00
|
|
|
, m_msgClient(0)
|
2011-01-12 13:51:26 +01:00
|
|
|
{
|
2011-09-14 16:58:10 +02:00
|
|
|
m_connectionTimer.setInterval(4000);
|
|
|
|
|
m_connectionTimer.setSingleShot(true);
|
2011-01-12 13:51:26 +01:00
|
|
|
}
|
2010-09-13 13:30:35 +02:00
|
|
|
|
|
|
|
|
QWeakPointer<DebuggerEngine> m_engine;
|
2011-07-26 16:22:49 +02:00
|
|
|
QmlDebuggerClient *m_qmlClient;
|
2012-03-14 09:30:28 +01:00
|
|
|
QmlJsDebugClient::QmlEngineDebugClient *m_engineDebugClient;
|
2011-01-12 13:51:26 +01:00
|
|
|
QTimer m_connectionTimer;
|
2010-09-13 13:30:35 +02:00
|
|
|
QDeclarativeDebugConnection *m_conn;
|
2011-07-26 16:22:49 +02:00
|
|
|
QHash<QString, QmlDebuggerClient*> debugClients;
|
2011-10-06 17:38:28 +02:00
|
|
|
int m_currentSelectedDebugId;
|
|
|
|
|
QString m_currentSelectedDebugName;
|
2011-12-20 16:12:38 +01:00
|
|
|
QmlJsDebugClient::QDebugMessageClient *m_msgClient;
|
2010-09-13 13:30:35 +02:00
|
|
|
};
|
|
|
|
|
|
2011-01-12 13:51:26 +01:00
|
|
|
} // namespace Internal
|
2010-08-13 14:18:10 +02:00
|
|
|
|
|
|
|
|
QmlAdapter::QmlAdapter(DebuggerEngine *engine, QObject *parent)
|
2011-01-12 13:51:26 +01:00
|
|
|
: QObject(parent), d(new Internal::QmlAdapterPrivate(engine))
|
2010-09-13 13:30:35 +02:00
|
|
|
{
|
2011-09-14 16:58:10 +02:00
|
|
|
connect(&d->m_connectionTimer, SIGNAL(timeout()), SLOT(checkConnectionState()));
|
2011-02-08 16:35:40 +01:00
|
|
|
d->m_conn = new QDeclarativeDebugConnection(this);
|
|
|
|
|
connect(d->m_conn, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
|
|
|
|
|
SLOT(connectionStateChanged()));
|
|
|
|
|
connect(d->m_conn, SIGNAL(error(QAbstractSocket::SocketError)),
|
|
|
|
|
SLOT(connectionErrorOccurred(QAbstractSocket::SocketError)));
|
|
|
|
|
|
2011-07-28 17:04:35 +02:00
|
|
|
ExtensionSystem::PluginManager *pluginManager =
|
|
|
|
|
ExtensionSystem::PluginManager::instance();
|
|
|
|
|
pluginManager->addObject(this);
|
2011-09-14 16:58:10 +02:00
|
|
|
|
|
|
|
|
createDebuggerClients();
|
2011-12-20 16:12:38 +01:00
|
|
|
d->m_msgClient = new QmlJsDebugClient::QDebugMessageClient(d->m_conn);
|
|
|
|
|
connect(d->m_msgClient, SIGNAL(newStatus(QDeclarativeDebugClient::Status)),
|
|
|
|
|
this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status)));
|
2010-09-13 13:30:35 +02:00
|
|
|
}
|
2010-08-13 14:18:10 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
QmlAdapter::~QmlAdapter()
|
2010-08-13 14:18:10 +02:00
|
|
|
{
|
2011-07-28 17:04:35 +02:00
|
|
|
ExtensionSystem::PluginManager *pluginManager =
|
|
|
|
|
ExtensionSystem::PluginManager::instance();
|
|
|
|
|
|
2011-09-16 15:00:41 +02:00
|
|
|
if (pluginManager->allObjects().contains(this))
|
2011-07-28 17:04:35 +02:00
|
|
|
pluginManager->removeObject(this);
|
2011-09-16 15:00:41 +02:00
|
|
|
delete d;
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
2012-02-21 15:47:55 +01:00
|
|
|
void QmlAdapter::beginConnectionTcp(const QString &address, quint16 port)
|
2010-08-13 14:18:10 +02:00
|
|
|
{
|
2011-02-17 15:57:26 +01:00
|
|
|
if (d->m_engine.isNull()
|
|
|
|
|
|| (d->m_conn && d->m_conn->state() != QAbstractSocket::UnconnectedState))
|
2011-02-08 16:35:40 +01:00
|
|
|
return;
|
2010-08-13 14:18:10 +02:00
|
|
|
|
2012-02-21 15:47:55 +01:00
|
|
|
showConnectionStatusMessage(tr("Connecting to debug server %1:%2").arg(address).arg(
|
|
|
|
|
QString::number(port)));
|
|
|
|
|
d->m_conn->connectToHost(address, port);
|
|
|
|
|
|
|
|
|
|
//A timeout to check the connection state
|
|
|
|
|
d->m_connectionTimer.start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlAdapter::beginConnectionOst(const QString &channel)
|
|
|
|
|
{
|
|
|
|
|
if (d->m_engine.isNull()
|
|
|
|
|
|| (d->m_conn && d->m_conn->state() != QAbstractSocket::UnconnectedState))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
showConnectionStatusMessage(tr("Connecting to debug server on %1").arg(channel));
|
|
|
|
|
d->m_conn->connectToOst(channel);
|
2011-09-14 16:58:10 +02:00
|
|
|
|
|
|
|
|
//A timeout to check the connection state
|
|
|
|
|
d->m_connectionTimer.start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlAdapter::closeConnection()
|
|
|
|
|
{
|
|
|
|
|
if (d->m_connectionTimer.isActive()) {
|
|
|
|
|
d->m_connectionTimer.stop();
|
|
|
|
|
} else {
|
|
|
|
|
if (d->m_conn) {
|
|
|
|
|
d->m_conn->close();
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
2010-08-27 13:11:55 +02:00
|
|
|
void QmlAdapter::connectionErrorOccurred(QAbstractSocket::SocketError socketError)
|
2010-08-13 14:18:10 +02:00
|
|
|
{
|
2010-12-16 16:20:21 +01:00
|
|
|
showConnectionStatusMessage(tr("Error: (%1) %2", "%1=error code, %2=error message")
|
2011-02-23 12:10:51 +01:00
|
|
|
.arg(socketError).arg(d->m_conn->errorString()));
|
2010-08-13 14:18:10 +02:00
|
|
|
|
|
|
|
|
// this is only an error if we are already connected and something goes wrong.
|
2011-09-14 16:58:10 +02:00
|
|
|
if (isConnected()) {
|
2010-08-27 13:11:55 +02:00
|
|
|
emit connectionError(socketError);
|
2011-09-14 16:58:10 +02:00
|
|
|
} else {
|
|
|
|
|
d->m_connectionTimer.stop();
|
|
|
|
|
emit connectionStartupFailed();
|
|
|
|
|
}
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
2010-09-30 14:05:20 +02:00
|
|
|
void QmlAdapter::clientStatusChanged(QDeclarativeDebugClient::Status status)
|
|
|
|
|
{
|
|
|
|
|
QString serviceName;
|
2011-02-17 15:57:26 +01:00
|
|
|
if (QDeclarativeDebugClient *client = qobject_cast<QDeclarativeDebugClient*>(sender()))
|
2010-09-30 14:05:20 +02:00
|
|
|
serviceName = client->name();
|
|
|
|
|
|
|
|
|
|
logServiceStatusChange(serviceName, status);
|
2011-12-20 16:12:38 +01:00
|
|
|
}
|
2010-09-30 15:03:42 +02:00
|
|
|
|
2012-01-12 10:18:25 +01:00
|
|
|
void QmlAdapter::debugClientStatusChanged(QDeclarativeDebugClient::Status status)
|
2011-12-20 16:12:38 +01:00
|
|
|
{
|
2012-01-12 10:18:25 +01:00
|
|
|
if (status != QDeclarativeDebugClient::Enabled)
|
|
|
|
|
return;
|
2011-12-20 16:12:38 +01:00
|
|
|
QDeclarativeDebugClient *client = qobject_cast<QDeclarativeDebugClient*>(sender());
|
|
|
|
|
QTC_ASSERT(client, return);
|
|
|
|
|
|
|
|
|
|
d->m_qmlClient = qobject_cast<Internal::QmlDebuggerClient *>(client);
|
|
|
|
|
d->m_qmlClient->startSession();
|
2010-09-30 14:05:20 +02:00
|
|
|
}
|
|
|
|
|
|
2010-08-13 14:18:10 +02:00
|
|
|
void QmlAdapter::connectionStateChanged()
|
|
|
|
|
{
|
2010-09-13 13:30:35 +02:00
|
|
|
switch (d->m_conn->state()) {
|
2011-02-17 15:57:26 +01:00
|
|
|
case QAbstractSocket::UnconnectedState:
|
|
|
|
|
{
|
|
|
|
|
showConnectionStatusMessage(tr("disconnected.\n\n"));
|
|
|
|
|
emit disconnected();
|
2010-08-13 14:18:10 +02:00
|
|
|
|
2011-02-17 15:57:26 +01:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case QAbstractSocket::HostLookupState:
|
|
|
|
|
showConnectionStatusMessage(tr("resolving host..."));
|
|
|
|
|
break;
|
|
|
|
|
case QAbstractSocket::ConnectingState:
|
|
|
|
|
showConnectionStatusMessage(tr("connecting to debug server..."));
|
|
|
|
|
break;
|
|
|
|
|
case QAbstractSocket::ConnectedState:
|
|
|
|
|
{
|
|
|
|
|
showConnectionStatusMessage(tr("connected.\n"));
|
|
|
|
|
|
2011-09-14 16:58:10 +02:00
|
|
|
d->m_connectionTimer.stop();
|
2011-07-26 16:22:49 +02:00
|
|
|
|
2011-02-17 15:57:26 +01:00
|
|
|
//reloadEngines();
|
|
|
|
|
emit connected();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case QAbstractSocket::ClosingState:
|
|
|
|
|
showConnectionStatusMessage(tr("closing..."));
|
|
|
|
|
break;
|
|
|
|
|
case QAbstractSocket::BoundState:
|
|
|
|
|
case QAbstractSocket::ListeningState:
|
|
|
|
|
break;
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-14 16:58:10 +02:00
|
|
|
void QmlAdapter::checkConnectionState()
|
|
|
|
|
{
|
|
|
|
|
if (!isConnected()) {
|
|
|
|
|
closeConnection();
|
|
|
|
|
emit connectionStartupFailed();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
void QmlAdapter::createDebuggerClients()
|
2010-08-13 14:18:10 +02:00
|
|
|
{
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
Internal::QScriptDebuggerClient *client1 = new Internal::QScriptDebuggerClient(d->m_conn);
|
|
|
|
|
connect(client1, SIGNAL(newStatus(QDeclarativeDebugClient::Status)),
|
2010-09-30 14:05:20 +02:00
|
|
|
this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status)));
|
2011-12-20 16:12:38 +01:00
|
|
|
connect(client1, SIGNAL(newStatus(QDeclarativeDebugClient::Status)),
|
|
|
|
|
this, SLOT(debugClientStatusChanged(QDeclarativeDebugClient::Status)));
|
2011-07-26 16:22:49 +02:00
|
|
|
|
|
|
|
|
Internal::QmlV8DebuggerClient *client2 = new Internal::QmlV8DebuggerClient(d->m_conn);
|
|
|
|
|
connect(client2, SIGNAL(newStatus(QDeclarativeDebugClient::Status)),
|
|
|
|
|
this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status)));
|
2011-12-20 16:12:38 +01:00
|
|
|
connect(client2, SIGNAL(newStatus(QDeclarativeDebugClient::Status)),
|
|
|
|
|
this, SLOT(debugClientStatusChanged(QDeclarativeDebugClient::Status)));
|
2011-07-26 16:22:49 +02:00
|
|
|
|
|
|
|
|
d->debugClients.insert(client1->name(),client1);
|
|
|
|
|
d->debugClients.insert(client2->name(),client2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
client1->setEngine((Internal::QmlEngine*)(d->m_engine.data()));
|
|
|
|
|
client2->setEngine((Internal::QmlEngine*)(d->m_engine.data()));
|
2010-08-13 14:18:10 +02:00
|
|
|
|
|
|
|
|
//engine->startSuccessful(); // FIXME: AAA: port to new debugger states
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool QmlAdapter::isConnected() const
|
|
|
|
|
{
|
2010-09-13 13:30:35 +02:00
|
|
|
return d->m_conn && d->m_qmlClient && d->m_conn->state() == QAbstractSocket::ConnectedState;
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDeclarativeDebugConnection *QmlAdapter::connection() const
|
|
|
|
|
{
|
2010-09-13 13:30:35 +02:00
|
|
|
return d->m_conn;
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
2011-11-29 11:39:41 +01:00
|
|
|
DebuggerEngine *QmlAdapter::debuggerEngine() const
|
|
|
|
|
{
|
|
|
|
|
return d->m_engine.data();
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-13 14:18:10 +02:00
|
|
|
void QmlAdapter::showConnectionStatusMessage(const QString &message)
|
|
|
|
|
{
|
2010-09-13 13:30:35 +02:00
|
|
|
if (!d->m_engine.isNull())
|
2011-09-20 12:05:43 +02:00
|
|
|
d->m_engine.data()->showMessage(QLatin1String("QML Debugger: ") + message, LogStatus);
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlAdapter::showConnectionErrorMessage(const QString &message)
|
|
|
|
|
{
|
2010-09-13 13:30:35 +02:00
|
|
|
if (!d->m_engine.isNull())
|
2011-09-20 12:05:43 +02:00
|
|
|
d->m_engine.data()->showMessage(QLatin1String("QML Debugger: ") + message, LogError);
|
2010-08-13 14:18:10 +02:00
|
|
|
}
|
|
|
|
|
|
2011-01-24 16:30:34 +01:00
|
|
|
bool QmlAdapter::disableJsDebugging(bool block)
|
|
|
|
|
{
|
|
|
|
|
if (d->m_engine.isNull())
|
|
|
|
|
return block;
|
|
|
|
|
|
|
|
|
|
bool isBlocked = d->m_engine.data()->state() == InferiorRunOk;
|
|
|
|
|
|
|
|
|
|
if (isBlocked == block)
|
|
|
|
|
return block;
|
|
|
|
|
|
2011-02-17 15:57:26 +01:00
|
|
|
if (block) {
|
2011-01-24 16:30:34 +01:00
|
|
|
d->m_engine.data()->continueInferior();
|
2011-02-17 15:57:26 +01:00
|
|
|
} else {
|
2011-01-24 16:30:34 +01:00
|
|
|
d->m_engine.data()->requestInterruptInferior();
|
2011-02-17 15:57:26 +01:00
|
|
|
}
|
2011-01-24 16:30:34 +01:00
|
|
|
|
|
|
|
|
return isBlocked;
|
|
|
|
|
}
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
Internal::QmlDebuggerClient *QmlAdapter::activeDebuggerClient()
|
|
|
|
|
{
|
|
|
|
|
return d->m_qmlClient;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QHash<QString, Internal::QmlDebuggerClient*> QmlAdapter::debuggerClients()
|
|
|
|
|
{
|
|
|
|
|
return d->debugClients;
|
|
|
|
|
}
|
2011-10-06 17:38:28 +02:00
|
|
|
|
2012-03-14 09:30:28 +01:00
|
|
|
QmlJsDebugClient::QmlEngineDebugClient *QmlAdapter::engineDebugClient() const
|
2011-10-06 17:38:28 +02:00
|
|
|
{
|
|
|
|
|
return d->m_engineDebugClient;
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-14 09:30:28 +01:00
|
|
|
void QmlAdapter::setEngineDebugClient(QmlJsDebugClient::QmlEngineDebugClient *client)
|
2011-10-06 17:38:28 +02:00
|
|
|
{
|
|
|
|
|
d->m_engineDebugClient = client;
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-20 16:12:38 +01:00
|
|
|
QmlJsDebugClient::QDebugMessageClient *QmlAdapter::messageClient() const
|
|
|
|
|
{
|
|
|
|
|
return d->m_msgClient;
|
|
|
|
|
}
|
|
|
|
|
|
2011-10-06 17:38:28 +02:00
|
|
|
int QmlAdapter::currentSelectedDebugId() const
|
|
|
|
|
{
|
|
|
|
|
return d->m_currentSelectedDebugId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString QmlAdapter::currentSelectedDisplayName() const
|
|
|
|
|
{
|
|
|
|
|
return d->m_currentSelectedDebugName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlAdapter::setCurrentSelectedDebugInfo(int currentDebugId, const QString &displayName)
|
|
|
|
|
{
|
|
|
|
|
d->m_currentSelectedDebugId = currentDebugId;
|
|
|
|
|
d->m_currentSelectedDebugName = displayName;
|
|
|
|
|
emit selectionChanged();
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-17 15:57:26 +01:00
|
|
|
void QmlAdapter::logServiceStatusChange(const QString &service,
|
|
|
|
|
QDeclarativeDebugClient::Status newStatus)
|
2010-09-30 14:05:20 +02:00
|
|
|
{
|
|
|
|
|
switch (newStatus) {
|
|
|
|
|
case QDeclarativeDebugClient::Unavailable: {
|
2011-09-20 12:05:43 +02:00
|
|
|
showConnectionStatusMessage(tr("Status of '%1' changed to 'unavailable'.").arg(service));
|
2010-09-30 14:05:20 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case QDeclarativeDebugClient::Enabled: {
|
2011-09-20 12:05:43 +02:00
|
|
|
showConnectionStatusMessage(tr("Status of '%1' changed to 'enabled'.").arg(service));
|
2010-09-30 14:05:20 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case QDeclarativeDebugClient::NotConnected: {
|
2011-09-20 12:05:43 +02:00
|
|
|
showConnectionStatusMessage(tr("Status of '%1' changed to 'not connected'.").arg(service));
|
2010-09-30 14:05:20 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-16 17:26:25 +01:00
|
|
|
void QmlAdapter::logServiceActivity(const QString &service, const QString &logMessage)
|
|
|
|
|
{
|
2010-12-17 10:18:34 +01:00
|
|
|
if (!d->m_engine.isNull())
|
2011-12-21 13:29:31 +01:00
|
|
|
d->m_engine.data()->showMessage(service + QLatin1Char(' ') + logMessage, LogDebug);
|
2010-12-16 17:26:25 +01:00
|
|
|
}
|
|
|
|
|
|
2010-08-13 14:18:10 +02:00
|
|
|
} // namespace Debugger
|