diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp index 8a11e5f840f..8151f3dbff6 100644 --- a/src/plugins/qmlprofiler/flamegraphmodel.cpp +++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp @@ -25,8 +25,8 @@ #include "flamegraphmodel.h" -#include -#include +#include "qmlprofilermodelmanager.h" +#include "qmlprofilerdatamodel.h" #include #include diff --git a/src/plugins/qmlprofiler/flamegraphview.cpp b/src/plugins/qmlprofiler/flamegraphview.cpp index e8c02d64551..cf5846a2581 100644 --- a/src/plugins/qmlprofiler/flamegraphview.cpp +++ b/src/plugins/qmlprofiler/flamegraphview.cpp @@ -25,9 +25,8 @@ #include "flamegraphview.h" #include "flamegraph.h" - -#include -#include +#include "qmlprofilerconstants.h" +#include "qmlprofilertool.h" #include #include diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index af137adcbf2..770e2c69453 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -37,9 +37,10 @@ #include #include -using namespace QmlProfiler; using namespace ProjectExplorer; +namespace QmlProfiler { + QString LocalQmlProfilerRunner::findFreeSocket() { QTemporaryFile file; @@ -140,3 +141,5 @@ void LocalQmlProfilerRunner::stop() if (m_launcher.isRunning()) m_launcher.stop(); } + +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmleventtype.h b/src/plugins/qmlprofiler/qmleventtype.h index 2a8c2385306..8b8eaa23dc0 100644 --- a/src/plugins/qmlprofiler/qmleventtype.h +++ b/src/plugins/qmlprofiler/qmleventtype.h @@ -35,16 +35,16 @@ struct QmlEventType { const QmlEventLocation &location = QmlEventLocation(), Message message = MaximumMessage, RangeType rangeType = MaximumRangeType, int detailType = -1, const QString &data = QString()) : - displayName(displayName), location(location), message(message), rangeType(rangeType), - detailType(detailType), data(data) + displayName(displayName), data(data), location(location), message(message), + rangeType(rangeType), detailType(detailType) {} QString displayName; + QString data; QmlEventLocation location; Message message; RangeType rangeType; int detailType; // can be EventType, BindingType, PixmapEventType or SceneGraphFrameType - QString data; }; } // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp index 40158aa357e..a0217af9a94 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp @@ -26,16 +26,16 @@ #include "qmlprofileranimationsmodel.h" #include "qmlprofilermodelmanager.h" #include "qmlprofilerdatamodel.h" -#include -#include +#include + +#include #include #include #include #include #include -#include namespace QmlProfiler { namespace Internal { @@ -205,5 +205,5 @@ QVariantMap QmlProfilerAnimationsModel::details(int index) const return result; } -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h index 2812c8b9b87..f41875cbfaa 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h @@ -77,5 +77,5 @@ private: int rowFromThreadId(int threadId) const; }; -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp index 89c3057de88..962169434f3 100644 --- a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp @@ -26,7 +26,6 @@ #include "qmlprofilerattachdialog.h" #include - #include #include diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp index 7baddb10fcc..c477b64a32d 100644 --- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp @@ -380,5 +380,5 @@ void BindingLoopsRenderPassState::updateIndexes(int from, int to) m_indexTo = to; } -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h index 6cf3486aa36..292cfc96846 100644 --- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h +++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h @@ -25,10 +25,12 @@ #pragma once +#include "qmlprofilerrangemodel.h" + #include "timeline/timelineabstractrenderer.h" #include "timeline/timelinerenderpass.h" #include "timeline/timelinerenderstate.h" -#include "qmlprofilerrangemodel.h" + #include namespace QmlProfiler { @@ -46,5 +48,5 @@ protected: QmlProfilerBindingLoopsRenderPass(); }; -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index 8321a50b2b1..ddd96da4f03 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -30,11 +30,11 @@ #include "qmlprofilermodelmanager.h" #include + #include #include #include -using namespace QmlDebug; using namespace Core; namespace QmlProfiler { @@ -45,7 +45,7 @@ class QmlProfilerClientManager::QmlProfilerClientManagerPrivate public: QmlProfilerStateManager *profilerState; - QmlDebugConnection *connection; + QmlDebug::QmlDebugConnection *connection; QPointer qmlclientplugin; QTimer connectionTimer; @@ -169,7 +169,7 @@ void QmlProfilerClientManager::connectLocalClient(const QString &file) void QmlProfilerClientManager::createConnection() { - d->connection = new QmlDebugConnection; + d->connection = new QmlDebug::QmlDebugConnection; QTC_ASSERT(d->profilerState, return); disconnectClientSignals(); @@ -180,13 +180,13 @@ void QmlProfilerClientManager::createConnection() d->profilerState->requestedFeatures()); d->qmlclientplugin->setFlushInterval(d->flushInterval); connectClientSignals(); - connect(d->connection, &QmlDebugConnection::connected, + connect(d->connection, &QmlDebug::QmlDebugConnection::connected, this, &QmlProfilerClientManager::qmlDebugConnectionOpened); - connect(d->connection, &QmlDebugConnection::disconnected, + connect(d->connection, &QmlDebug::QmlDebugConnection::disconnected, this, &QmlProfilerClientManager::qmlDebugConnectionClosed); - connect(d->connection, &QmlDebugConnection::socketError, + connect(d->connection, &QmlDebug::QmlDebugConnection::socketError, this, &QmlProfilerClientManager::qmlDebugConnectionError); - connect(d->connection, &QmlDebugConnection::socketStateChanged, + connect(d->connection, &QmlDebug::QmlDebugConnection::socketStateChanged, this, &QmlProfilerClientManager::qmlDebugConnectionStateChanged); } @@ -313,7 +313,7 @@ void QmlProfilerClientManager::qmlDebugConnectionClosed() void QmlProfilerClientManager::qmlDebugConnectionError(QAbstractSocket::SocketError error) { - logState(QmlDebugConnection::socketErrorToString(error)); + logState(QmlDebug::QmlDebugConnection::socketErrorToString(error)); if (d->connection->isConnected()) { disconnectClient(); emit connectionClosed(); @@ -324,7 +324,7 @@ void QmlProfilerClientManager::qmlDebugConnectionError(QAbstractSocket::SocketEr void QmlProfilerClientManager::qmlDebugConnectionStateChanged(QAbstractSocket::SocketState state) { - logState(QmlDebugConnection::socketStateToString(state)); + logState(QmlDebug::QmlDebugConnection::socketStateToString(state)); } void QmlProfilerClientManager::logState(const QString &msg) diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.h b/src/plugins/qmlprofiler/qmlprofilerclientmanager.h index 2d6c7a9ec70..5c687e8cf4a 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.h @@ -95,5 +95,5 @@ private: void stopClientsRecording(); }; -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerconstants.h b/src/plugins/qmlprofiler/qmlprofilerconstants.h index 4f48437d697..bc113734dfe 100644 --- a/src/plugins/qmlprofiler/qmlprofilerconstants.h +++ b/src/plugins/qmlprofiler/qmlprofilerconstants.h @@ -38,6 +38,8 @@ const char AGGREGATE_TRACES[] = "Analyzer.QmlProfiler.AggregateTraces"; const char SETTINGS[] = "Analyzer.QmlProfiler.Settings"; const char ANALYZER[] = "Analyzer"; +const int QML_MIN_LEVEL = 1; // Set to 0 to remove the empty line between models in the timeline + const char TraceFileExtension[] = ".qtd"; const char QmlProfilerPerspectiveId[] = "QmlProfiler.Perspective"; diff --git a/src/plugins/qmlprofiler/qmlprofilerdatamodel.cpp b/src/plugins/qmlprofiler/qmlprofilerdatamodel.cpp index 43395b94d3a..6ac21947396 100644 --- a/src/plugins/qmlprofiler/qmlprofilerdatamodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerdatamodel.cpp @@ -291,4 +291,4 @@ void QmlProfilerDataModel::detailsDone() d->modelManager->processingDone(); } -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilereventlocation.h b/src/plugins/qmlprofiler/qmlprofilereventlocation.h index ee651b99260..8ee6de60e25 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventlocation.h +++ b/src/plugins/qmlprofiler/qmlprofilereventlocation.h @@ -42,4 +42,4 @@ struct QMLPROFILER_EXPORT QmlEventLocation int column; }; -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilereventsview.h b/src/plugins/qmlprofiler/qmlprofilereventsview.h index b24cbed633f..9406c8e9713 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventsview.h +++ b/src/plugins/qmlprofiler/qmlprofilereventsview.h @@ -53,4 +53,4 @@ public slots: virtual void onVisibleFeaturesChanged(quint64 features) = 0; }; -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilereventtypes.h b/src/plugins/qmlprofiler/qmlprofilereventtypes.h index dce0cf1d449..1ca5ccc3d9c 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventtypes.h +++ b/src/plugins/qmlprofiler/qmlprofilereventtypes.h @@ -169,7 +169,6 @@ inline ProfileFeature featureFromRangeType(RangeType range) } namespace Constants { -const int QML_MIN_LEVEL = 1; // Set to 0 to remove the empty line between models in the timeline // Shorthand for all QML and JS range features. const quint64 QML_JS_RANGE_FEATURES = (1 << ProfileCompiling) | @@ -177,6 +176,6 @@ const quint64 QML_JS_RANGE_FEATURES = (1 << ProfileCompiling) | (1 << ProfileBinding) | (1 << ProfileHandlingSignal) | (1 << ProfileJavaScript); -} +} // namespace Constants } // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index c8c71a27c28..ed42ee2c253 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -129,18 +129,14 @@ void QmlProfilerTraceTime::increaseEndTime(qint64 time) class QmlProfilerModelManager::QmlProfilerModelManagerPrivate { public: - QmlProfilerModelManagerPrivate(QmlProfilerModelManager *qq) : q(qq) {} - ~QmlProfilerModelManagerPrivate() {} - QmlProfilerModelManager *q; - QmlProfilerDataModel *model; QmlProfilerNotesModel *notesModel; QmlProfilerModelManager::State state; QmlProfilerTraceTime *traceTime; - QVector partialCounts; - QVector partialCountWeights; + QVector partialCounts; + QVector partialCountWeights; quint64 availableFeatures; quint64 visibleFeatures; quint64 recordedFeatures; @@ -152,7 +148,7 @@ public: QmlProfilerModelManager::QmlProfilerModelManager(Utils::FileInProjectFinder *finder, QObject *parent) : - QObject(parent), d(new QmlProfilerModelManagerPrivate(this)) + QObject(parent), d(new QmlProfilerModelManagerPrivate) { d->totalWeight = 0; d->previousProgress = 0; @@ -293,12 +289,12 @@ void QmlProfilerModelManager::addQmlEvent(Message message, RangeType rangeType, ndata2, ndata3, ndata4, ndata5); } -void QmlProfilerModelManager::addDebugMessage(QtMsgType type, qint64 timestamp, const QString &text, - const QmlEventLocation &location) +void QmlProfilerModelManager::addDebugMessage(qint64 timestamp, QtMsgType messageType, + const QString &text, const QmlEventLocation &location) { if (state() == AcquiringData) - d->model->addEvent(DebugMessage, MaximumRangeType, type, timestamp, 0, text, location, 0, 0, - 0, 0, 0); + d->model->addEvent(DebugMessage, MaximumRangeType, messageType, timestamp, 0, text, + location, 0, 0, 0, 0, 0); } void QmlProfilerModelManager::acquiringDone() @@ -443,7 +439,7 @@ void QmlProfilerModelManager::clear() setState(Empty); } -void QmlProfilerModelManager::prepareForWriting() +void QmlProfilerModelManager::startAcquiring() { setState(AcquiringData); } diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h index 335f68e5648..4c3fdec85ae 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h @@ -116,7 +116,6 @@ signals: void loadFinished(); void saveFinished(); - void requestDetailsForLocation(int eventType, const QmlEventLocation &location); void availableFeaturesChanged(quint64 features); void visibleFeaturesChanged(quint64 features); void recordedFeaturesChanged(quint64 features); @@ -124,11 +123,11 @@ signals: public slots: void clear(); - void prepareForWriting(); + void startAcquiring(); void addQmlEvent(Message message, RangeType rangeType, int bindingType, qint64 startTime, qint64 length, const QString &data, const QmlEventLocation &location, qint64 ndata1, qint64 ndata2, qint64 ndata3, qint64 ndata4, qint64 ndata5); - void addDebugMessage(QtMsgType type, qint64 timestamp, const QString &text, + void addDebugMessage(qint64 timestamp, QtMsgType type, const QString &text, const QmlEventLocation &location); void save(const QString &filename); @@ -142,4 +141,4 @@ private: QmlProfilerModelManagerPrivate *d; }; -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index 35bfd566905..a34085a2dd9 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -27,6 +27,7 @@ #include "qmlprofilermodelmanager.h" #include "qmlprofilerdatamodel.h" #include "qmlprofilerbindingloopsrenderpass.h" + #include "timeline/timelinenotesrenderpass.h" #include "timeline/timelineitemsrenderpass.h" #include "timeline/timelineselectionrenderpass.h" @@ -38,12 +39,9 @@ #include #include -#include - namespace QmlProfiler { namespace Internal { - QmlProfilerRangeModel::QmlProfilerRangeModel(QmlProfilerModelManager *manager, RangeType range, QObject *parent) : QmlProfilerTimelineModel(manager, MaximumMessage, range, featureFromRangeType(range), parent) @@ -272,5 +270,5 @@ QList QmlProfilerRangeModel::supportedRend } -} -} +} // namespace Internal +} // namespaec QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h index 67ee663ce5c..8aa43a2ae25 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h @@ -29,6 +29,7 @@ #include "qmlprofilerdatamodel.h" #include "qmlprofilereventtypes.h" #include "qmlprofilereventlocation.h" +#include "qmlprofilerconstants.h" #include #include @@ -86,5 +87,5 @@ private: QVector m_expandedRowTypes; }; -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 072597556ae..26f812ec37a 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -24,7 +24,6 @@ ****************************************************************************/ #include "qmlprofilerruncontrol.h" - #include "localqmlprofilerrunner.h" #include "qmlprofilertool.h" diff --git a/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp b/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp index 6f7166c0d23..2ed95cebd9b 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatemanager.cpp @@ -176,4 +176,4 @@ void QmlProfilerStateManager::setRecordedFeatures(quint64 features) } } -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerstatemanager.h b/src/plugins/qmlprofiler/qmlprofilerstatemanager.h index aa860b6b4ed..6483d3a0701 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatemanager.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatemanager.h @@ -70,4 +70,4 @@ private: QmlProfilerStateManagerPrivate *d; }; -} +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp index d8c4cd4edd0..4165ecfe903 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp @@ -227,5 +227,5 @@ void QmlProfilerStateWidget::updateDisplay() setVisible(false); } -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h index 2f953a29731..6ff6e7e3b35 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.h @@ -25,11 +25,11 @@ #pragma once -#include - #include "qmlprofilerstatemanager.h" #include "qmlprofilermodelmanager.h" +#include + namespace QmlProfiler { namespace Internal { @@ -54,5 +54,5 @@ private: QmlProfilerStateWidgetPrivate *d; }; -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp index 46baa6645a6..f64d95258bc 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp @@ -32,12 +32,9 @@ #include #include -#include #include #include -#include - -#include +#include namespace QmlProfiler { diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.h b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.h index c81c074113d..35f93cb09c7 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.h @@ -29,6 +29,7 @@ #include "qmlprofilernotesmodel.h" #include "qmlprofilereventtypes.h" #include "qmlprofilereventlocation.h" +#include "qmlprofilerconstants.h" #include #include diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp index 00b5ef1edb6..46574cde7bb 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp @@ -24,28 +24,23 @@ ****************************************************************************/ #include "qmlprofilerstatisticsview.h" +#include "qmlprofilerviewmanager.h" +#include "qmlprofilertool.h" + +#include +#include #include #include - #include #include - #include #include - #include -#include - -#include #include #include - -#include "qmlprofilerviewmanager.h" -#include "qmlprofilertool.h" #include -#include #include namespace QmlProfiler { diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h index 522ccf0fcc1..891b23db5ad 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h @@ -123,7 +123,6 @@ public: void setShowExtendedStatistics(bool); bool showExtendedStatistics() const; - signals: void gotoSourceLocation(const QString &fileName, int lineNumber, int columnNumber); void typeSelected(int typeIndex); diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 80eb44c32bf..33da2c02977 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -875,7 +875,7 @@ void QmlProfilerTool::serverRecordingChanged() if (!d->m_profilerConnections->aggregateTraces() || d->m_profilerModelManager->state() == QmlProfilerModelManager::Done) clearData(); - d->m_profilerModelManager->prepareForWriting(); + d->m_profilerModelManager->startAcquiring(); } else { setRecording(false); @@ -908,5 +908,5 @@ void QmlProfilerTool::toggleVisibleFeature(QAction *action) d->m_profilerModelManager->visibleFeatures() & (~(1ULL << feature))); } -} -} +} // namespace Internal +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp index e020a6c5107..ce3b82c578e 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp @@ -64,10 +64,6 @@ public: quint32 flushInterval; }; -} // namespace QmlProfiler - -using namespace QmlProfiler; - void QmlProfilerTraceClientPrivate::sendRecordingStatus(int engineId) { QmlDebug::QPacket stream(q->connection()->currentDataStreamVersion()); @@ -150,7 +146,7 @@ void QmlProfilerTraceClient::setRequestedFeatures(quint64 features) const QmlDebug::QDebugContextInfo &context) { d->updateFeatures(ProfileDebugMessages); - emit debugMessage(type, context.timestamp, text, + emit debugMessage(context.timestamp, type, text, QmlEventLocation(context.file, context.line, 1)); }); } else { @@ -399,3 +395,5 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data) break; } } + +} // namespace QmlProfiler diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.h b/src/plugins/qmlprofiler/qmlprofilertraceclient.h index 1eb00627870..23fbcdc02a1 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceclient.h +++ b/src/plugins/qmlprofiler/qmlprofilertraceclient.h @@ -41,9 +41,6 @@ class QmlProfilerTraceClient : public QmlDebug::QmlDebugClient Q_OBJECT Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged) - // don't hide by signal - using QObject::event; - public: QmlProfilerTraceClient(QmlDebug::QmlDebugConnection *client, quint64 features); ~QmlProfilerTraceClient(); @@ -60,13 +57,16 @@ public slots: signals: void complete(qint64 maximumTime); - void traceFinished(qint64 time, const QList &engineIds); - void traceStarted(qint64 time, const QList &engineIds); + void traceFinished(qint64 timestamp, const QList &engineIds); + void traceStarted(qint64 timestamp, const QList &engineIds); + void rangedEvent(Message, RangeType, int detailType, qint64 startTime, qint64 length, const QString &data, const QmlEventLocation &location, qint64 param1, qint64 param2, qint64 param3, qint64 param4, qint64 param5); - void debugMessage(QtMsgType type, qint64 timestamp, const QString &text, + + void debugMessage(qint64 timestamp, QtMsgType type, const QString &text, const QmlEventLocation &location); + void recordingChanged(bool arg); void recordedFeaturesChanged(quint64 features); void newEngine(int engineId); diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp index 62c78c85f7d..7a49f6175e7 100644 --- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp @@ -25,7 +25,6 @@ #include "qmlprofilertracefile.h" - #include #include @@ -657,12 +656,12 @@ void QmlProfilerFileWriter::save(QIODevice *device) if (isCanceled()) return; - const QmlNote ¬es = m_notes[noteIndex]; + const QmlNote ¬e = m_notes[noteIndex]; stream.writeStartElement(_("note")); - stream.writeAttribute(_("startTime"), QString::number(notes.startTime)); - stream.writeAttribute(_("duration"), QString::number(notes.duration)); - stream.writeAttribute(_("eventIndex"), QString::number(notes.typeIndex)); - stream.writeCharacters(notes.text); + stream.writeAttribute(_("startTime"), QString::number(note.startTime)); + stream.writeAttribute(_("duration"), QString::number(note.duration)); + stream.writeAttribute(_("eventIndex"), QString::number(note.typeIndex)); + stream.writeCharacters(note.text); stream.writeEndElement(); // note incrementProgress(); } @@ -692,6 +691,5 @@ bool QmlProfilerFileWriter::isCanceled() const return m_future && m_future->isCanceled(); } - } // namespace Internal } // namespace QmlProfiler