Commit c412abf2 authored by Kai Koehne's avatar Kai Koehne
Browse files

QMLDebugger: Unify status messages

Use "QML Debugger" as in qmlengine.cpp . Also don't print a warning
if the status is 'unavailable' as this is the default first state
in ',block' mode.

Change-Id: I21d8285eabdb6a2ced87ddc865eae1704e843cd0
Reviewed-on: http://codereview.qt-project.org/5228

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent d23a1adc
......@@ -235,13 +235,13 @@ QDeclarativeDebugConnection *QmlAdapter::connection() const
void QmlAdapter::showConnectionStatusMessage(const QString &message)
{
if (!d->m_engine.isNull())
d->m_engine.data()->showMessage(QLatin1String("QmlDebugger: ") + message, LogStatus);
d->m_engine.data()->showMessage(QLatin1String("QML Debugger: ") + message, LogStatus);
}
void QmlAdapter::showConnectionErrorMessage(const QString &message)
{
if (!d->m_engine.isNull())
d->m_engine.data()->showMessage(QLatin1String("QmlDebugger: ") + message, LogError);
d->m_engine.data()->showMessage(QLatin1String("QML Debugger: ") + message, LogError);
}
bool QmlAdapter::disableJsDebugging(bool block)
......@@ -277,17 +277,16 @@ void QmlAdapter::logServiceStatusChange(const QString &service,
{
switch (newStatus) {
case QDeclarativeDebugClient::Unavailable: {
showConnectionStatusMessage(tr("Debug service '%1' became unavailable.").arg(service));
emit serviceConnectionError(service);
showConnectionStatusMessage(tr("Status of '%1' changed to 'unavailable'.").arg(service));
break;
}
case QDeclarativeDebugClient::Enabled: {
showConnectionStatusMessage(tr("Connected to debug service '%1'.").arg(service));
showConnectionStatusMessage(tr("Status of '%1' changed to 'enabled'.").arg(service));
break;
}
case QDeclarativeDebugClient::NotConnected: {
showConnectionStatusMessage(tr("Not connected to debug service '%1'.").arg(service));
showConnectionStatusMessage(tr("Status of '%1' changed to 'not connected'.").arg(service));
break;
}
}
......
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