diff options
Diffstat (limited to 'src/qmldebug')
-rw-r--r-- | src/qmldebug/qqmldebugclient.cpp | 5 | ||||
-rw-r--r-- | src/qmldebug/qqmldebugclient_p.h | 5 | ||||
-rw-r--r-- | src/qmldebug/qqmldebugconnection.cpp | 4 | ||||
-rw-r--r-- | src/qmldebug/qqmldebugmessageclient.cpp | 5 | ||||
-rw-r--r-- | src/qmldebug/qqmldebugmessageclient_p.h | 5 | ||||
-rw-r--r-- | src/qmldebug/qqmlenginecontrolclient.cpp | 6 | ||||
-rw-r--r-- | src/qmldebug/qqmlprofilerclient.cpp | 7 | ||||
-rw-r--r-- | src/qmldebug/qqmlprofilerclient_p.h | 2 | ||||
-rw-r--r-- | src/qmldebug/qqmlprofilerclient_p_p.h | 3 |
9 files changed, 16 insertions, 26 deletions
diff --git a/src/qmldebug/qqmldebugclient.cpp b/src/qmldebug/qqmldebugclient.cpp index d412b7b267..03123cc6e0 100644 --- a/src/qmldebug/qqmldebugclient.cpp +++ b/src/qmldebug/qqmldebugclient.cpp @@ -117,11 +117,6 @@ QQmlDebugConnection *QQmlDebugClient::connection() const return d->connection; } -void QQmlDebugClient::stateChanged(QQmlDebugClient::State state) -{ - Q_UNUSED(state); -} - void QQmlDebugClient::messageReceived(const QByteArray &message) { Q_UNUSED(message); diff --git a/src/qmldebug/qqmldebugclient_p.h b/src/qmldebug/qqmldebugclient_p.h index 723de5ee43..469b65d4a9 100644 --- a/src/qmldebug/qqmldebugclient_p.h +++ b/src/qmldebug/qqmldebugclient_p.h @@ -76,13 +76,14 @@ public: QQmlDebugConnection *connection() const; +signals: + void stateChanged(State state); + protected: QQmlDebugClient(QQmlDebugClientPrivate &dd); private: friend class QQmlDebugConnection; - - virtual void stateChanged(State state); virtual void messageReceived(const QByteArray &message); }; diff --git a/src/qmldebug/qqmldebugconnection.cpp b/src/qmldebug/qqmldebugconnection.cpp index 67bad8d812..4e087ee6db 100644 --- a/src/qmldebug/qqmldebugconnection.cpp +++ b/src/qmldebug/qqmldebugconnection.cpp @@ -259,7 +259,7 @@ QQmlDebugConnection::~QQmlDebugConnection() Q_D(QQmlDebugConnection); QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) - iter.value()->stateChanged(QQmlDebugClient::NotConnected); + emit iter.value()->stateChanged(QQmlDebugClient::NotConnected); } int QQmlDebugConnection::currentDataStreamVersion() const @@ -295,7 +295,7 @@ void QQmlDebugConnection::close() QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) - iter.value()->stateChanged(QQmlDebugClient::NotConnected); + emit iter.value()->stateChanged(QQmlDebugClient::NotConnected); } if (d->device) { diff --git a/src/qmldebug/qqmldebugmessageclient.cpp b/src/qmldebug/qqmldebugmessageclient.cpp index a03c1f8af2..0892404194 100644 --- a/src/qmldebug/qqmldebugmessageclient.cpp +++ b/src/qmldebug/qqmldebugmessageclient.cpp @@ -58,11 +58,6 @@ QQmlDebugMessageClient::QQmlDebugMessageClient(QQmlDebugConnection *client) { } -void QQmlDebugMessageClient::stateChanged(State state) -{ - emit newState(state); -} - void QQmlDebugMessageClient::messageReceived(const QByteArray &data) { QDataStream ds(data); diff --git a/src/qmldebug/qqmldebugmessageclient_p.h b/src/qmldebug/qqmldebugmessageclient_p.h index 75c70044e4..a2a7f28f81 100644 --- a/src/qmldebug/qqmldebugmessageclient_p.h +++ b/src/qmldebug/qqmldebugmessageclient_p.h @@ -71,15 +71,10 @@ class QQmlDebugMessageClient : public QQmlDebugClient public: explicit QQmlDebugMessageClient(QQmlDebugConnection *client); - virtual void stateChanged(State state) override; virtual void messageReceived(const QByteArray &) override; signals: - void newState(QQmlDebugClient::State); void message(QtMsgType, const QString &, const QQmlDebugContextInfo &); - -private: - Q_DISABLE_COPY(QQmlDebugMessageClient) }; QT_END_NAMESPACE diff --git a/src/qmldebug/qqmlenginecontrolclient.cpp b/src/qmldebug/qqmlenginecontrolclient.cpp index 45d672d4bc..cdc724ef2f 100644 --- a/src/qmldebug/qqmlenginecontrolclient.cpp +++ b/src/qmldebug/qqmlenginecontrolclient.cpp @@ -98,8 +98,8 @@ void QQmlEngineControlClient::messageReceived(const QByteArray &data) { Q_D(QQmlEngineControlClient); QPacket stream(d->connection->currentDataStreamVersion(), data); - int message; - int id; + qint32 message; + qint32 id; QString name; stream >> message >> id; @@ -150,7 +150,7 @@ void QQmlEngineControlClientPrivate::sendCommand( { Q_Q(QQmlEngineControlClient); QPacket stream(connection->currentDataStreamVersion()); - stream << int(command) << engineId; + stream << static_cast<qint32>(command) << engineId; q->sendMessage(stream.data()); } diff --git a/src/qmldebug/qqmlprofilerclient.cpp b/src/qmldebug/qqmlprofilerclient.cpp index 661b43f164..73db2ad94d 100644 --- a/src/qmldebug/qqmlprofilerclient.cpp +++ b/src/qmldebug/qqmlprofilerclient.cpp @@ -42,6 +42,10 @@ QT_BEGIN_NAMESPACE +QQmlProfilerClientPrivate::~QQmlProfilerClientPrivate() +{ +} + int QQmlProfilerClientPrivate::resolveType(const QQmlProfilerTypedEvent &event) { int typeIndex = -1; @@ -165,6 +169,7 @@ QQmlProfilerClient::QQmlProfilerClient(QQmlDebugConnection *connection, { Q_D(QQmlProfilerClient); setRequestedFeatures(features); + connect(this, &QQmlDebugClient::stateChanged, this, &QQmlProfilerClient::onStateChanged); connect(d->engineControl.data(), &QQmlEngineControlClient::engineAboutToBeAdded, this, &QQmlProfilerClient::sendRecordingStatus); connect(d->engineControl.data(), &QQmlEngineControlClient::engineAboutToBeRemoved, @@ -314,7 +319,7 @@ bool QQmlProfilerClientPrivate::updateFeatures(ProfileFeature feature) return true; } -void QQmlProfilerClient::stateChanged(State status) +void QQmlProfilerClient::onStateChanged(State status) { if (status == Enabled) { sendRecordingStatus(-1); diff --git a/src/qmldebug/qqmlprofilerclient_p.h b/src/qmldebug/qqmlprofilerclient_p.h index 7b8e286f5b..89c117a8b5 100644 --- a/src/qmldebug/qqmlprofilerclient_p.h +++ b/src/qmldebug/qqmlprofilerclient_p.h @@ -76,7 +76,6 @@ public: void setRecording(bool); quint64 recordedFeatures() const; virtual void messageReceived(const QByteArray &) override; - virtual void stateChanged(State status) override; void clearEvents(); void clearAll(); @@ -87,6 +86,7 @@ public: protected: QQmlProfilerClient(QQmlProfilerClientPrivate &dd); + void onStateChanged(State status); signals: void complete(qint64 maximumTime); diff --git a/src/qmldebug/qqmlprofilerclient_p_p.h b/src/qmldebug/qqmlprofilerclient_p_p.h index 994c08cafc..df73209858 100644 --- a/src/qmldebug/qqmlprofilerclient_p_p.h +++ b/src/qmldebug/qqmlprofilerclient_p_p.h @@ -79,7 +79,7 @@ public: { } - virtual ~QQmlProfilerClientPrivate() override {} + virtual ~QQmlProfilerClientPrivate() override; void sendRecordingStatus(int engineId); bool updateFeatures(ProfileFeature feature); @@ -112,4 +112,3 @@ public: QT_END_NAMESPACE #endif // QQMLPROFILERCLIENT_P_P_H - |