QmlDebugClient: make QmlDebugConnection::flush() private

There is no reason for any external class to access that. If the call
to flush() from the qml profiler had any effect then it hid a bug that
should be fixed.

Change-Id: I8f655733bd3bff808653cd56b1904aa87c31f6c0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-05-05 17:34:03 +02:00
parent 0ef1b78724
commit 776b375540
3 changed files with 6 additions and 8 deletions

View File

@@ -67,6 +67,7 @@ public:
QHash<QString, QmlDebugClient *> 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<QAbstractSocket*>(d->device);
QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(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)