forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
|
||||
bool isConnected() const;
|
||||
QAbstractSocket::SocketState socketState() const;
|
||||
void flush();
|
||||
void close();
|
||||
QString errorString() const;
|
||||
|
||||
|
||||
@@ -136,8 +136,6 @@ void QmlProfilerClientManager::clearBufferedData()
|
||||
|
||||
void QmlProfilerClientManager::discardPendingData()
|
||||
{
|
||||
if (d->connection)
|
||||
d->connection->flush();
|
||||
clearBufferedData();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user