diff --git a/src/libs/qmldebug/qmldebugclient.cpp b/src/libs/qmldebug/qmldebugclient.cpp index b11b73c29e7..d9cf8fa932c 100644 --- a/src/libs/qmldebug/qmldebugclient.cpp +++ b/src/libs/qmldebug/qmldebugclient.cpp @@ -67,6 +67,7 @@ public: QHash plugins; void advertisePlugins(); + void flush(); public Q_SLOTS: void connected(); @@ -87,7 +88,7 @@ void QmlDebugConnectionPrivate::advertisePlugins() QPacket pack; pack << serverId << 1 << plugins.keys(); protocol->send(pack); - q->flush(); + flush(); } void QmlDebugConnectionPrivate::connected() @@ -96,7 +97,7 @@ void QmlDebugConnectionPrivate::connected() QDataStream str; pack << serverId << 0 << protocolVersion << plugins.keys() << QDataStream().version(); protocol->send(pack); - q->flush(); + flush(); } void QmlDebugConnectionPrivate::readyRead() @@ -263,9 +264,9 @@ QAbstractSocket::SocketState QmlDebugConnection::socketState() const return QAbstractSocket::UnconnectedState; } -void QmlDebugConnection::flush() +void QmlDebugConnectionPrivate::flush() { - QAbstractSocket *socket = qobject_cast(d->device); + QAbstractSocket *socket = qobject_cast(device); if (socket) { socket->flush(); return; @@ -359,7 +360,7 @@ void QmlDebugClient::sendMessage(const QByteArray &message) QPacket pack; pack << d->name << message; d->connection->d->protocol->send(pack); - d->connection->flush(); + d->connection->d->flush(); } void QmlDebugClient::stateChanged(State) diff --git a/src/libs/qmldebug/qmldebugclient.h b/src/libs/qmldebug/qmldebugclient.h index 0f06aed35de..e4109f97d73 100644 --- a/src/libs/qmldebug/qmldebugclient.h +++ b/src/libs/qmldebug/qmldebugclient.h @@ -50,7 +50,6 @@ public: bool isConnected() const; QAbstractSocket::SocketState socketState() const; - void flush(); void close(); QString errorString() const; diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index 23b83f49000..5501d505156 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -136,8 +136,6 @@ void QmlProfilerClientManager::clearBufferedData() void QmlProfilerClientManager::discardPendingData() { - if (d->connection) - d->connection->flush(); clearBufferedData(); }