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;
|
QHash<QString, QmlDebugClient *> plugins;
|
||||||
|
|
||||||
void advertisePlugins();
|
void advertisePlugins();
|
||||||
|
void flush();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void connected();
|
void connected();
|
||||||
@@ -87,7 +88,7 @@ void QmlDebugConnectionPrivate::advertisePlugins()
|
|||||||
QPacket pack;
|
QPacket pack;
|
||||||
pack << serverId << 1 << plugins.keys();
|
pack << serverId << 1 << plugins.keys();
|
||||||
protocol->send(pack);
|
protocol->send(pack);
|
||||||
q->flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlDebugConnectionPrivate::connected()
|
void QmlDebugConnectionPrivate::connected()
|
||||||
@@ -96,7 +97,7 @@ void QmlDebugConnectionPrivate::connected()
|
|||||||
QDataStream str;
|
QDataStream str;
|
||||||
pack << serverId << 0 << protocolVersion << plugins.keys() << QDataStream().version();
|
pack << serverId << 0 << protocolVersion << plugins.keys() << QDataStream().version();
|
||||||
protocol->send(pack);
|
protocol->send(pack);
|
||||||
q->flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlDebugConnectionPrivate::readyRead()
|
void QmlDebugConnectionPrivate::readyRead()
|
||||||
@@ -263,9 +264,9 @@ QAbstractSocket::SocketState QmlDebugConnection::socketState() const
|
|||||||
return QAbstractSocket::UnconnectedState;
|
return QAbstractSocket::UnconnectedState;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlDebugConnection::flush()
|
void QmlDebugConnectionPrivate::flush()
|
||||||
{
|
{
|
||||||
QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(d->device);
|
QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(device);
|
||||||
if (socket) {
|
if (socket) {
|
||||||
socket->flush();
|
socket->flush();
|
||||||
return;
|
return;
|
||||||
@@ -359,7 +360,7 @@ void QmlDebugClient::sendMessage(const QByteArray &message)
|
|||||||
QPacket pack;
|
QPacket pack;
|
||||||
pack << d->name << message;
|
pack << d->name << message;
|
||||||
d->connection->d->protocol->send(pack);
|
d->connection->d->protocol->send(pack);
|
||||||
d->connection->flush();
|
d->connection->d->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlDebugClient::stateChanged(State)
|
void QmlDebugClient::stateChanged(State)
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public:
|
|||||||
|
|
||||||
bool isConnected() const;
|
bool isConnected() const;
|
||||||
QAbstractSocket::SocketState socketState() const;
|
QAbstractSocket::SocketState socketState() const;
|
||||||
void flush();
|
|
||||||
void close();
|
void close();
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,6 @@ void QmlProfilerClientManager::clearBufferedData()
|
|||||||
|
|
||||||
void QmlProfilerClientManager::discardPendingData()
|
void QmlProfilerClientManager::discardPendingData()
|
||||||
{
|
{
|
||||||
if (d->connection)
|
|
||||||
d->connection->flush();
|
|
||||||
clearBufferedData();
|
clearBufferedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user