forked from qt-creator/qt-creator
QmlObserver: Prevent messages from being sent if there is no server side
Actually this is fixed in QDeclarativeService::sendMessage, too, but the fix won't be part of 4.7.1, so better double-check. Reviewed-by: Christiaan Janssen
This commit is contained in:
@@ -70,6 +70,8 @@ public:
|
|||||||
void reloaded();
|
void reloaded();
|
||||||
QString idStringForObject(QObject *obj) const;
|
QString idStringForObject(QObject *obj) const;
|
||||||
|
|
||||||
|
void sendMessage(const QByteArray &message);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void selectedColorChanged(const QColor &color);
|
void selectedColorChanged(const QColor &color);
|
||||||
void contextPathUpdated(const QStringList &contextPath);
|
void contextPathUpdated(const QStringList &contextPath);
|
||||||
|
|||||||
@@ -236,4 +236,12 @@ QString QDeclarativeObserverService::idStringForObject(QObject *obj) const
|
|||||||
return idString;
|
return idString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QDeclarativeObserverService::sendMessage(const QByteArray &message)
|
||||||
|
{
|
||||||
|
if (status() != Enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QDeclarativeDebugService::sendMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace QmlJSDebugger
|
} // namespace QmlJSDebugger
|
||||||
|
|||||||
Reference in New Issue
Block a user