diff --git a/src/libs/qmljsdebugclient/qmljsdebugclient-lib.pri b/src/libs/qmljsdebugclient/qmljsdebugclient-lib.pri index c06b4267296..1eceea45d39 100644 --- a/src/libs/qmljsdebugclient/qmljsdebugclient-lib.pri +++ b/src/libs/qmljsdebugclient/qmljsdebugclient-lib.pri @@ -10,12 +10,15 @@ HEADERS += \ $$PWD/qdeclarativeenginedebug.h \ $$PWD/qpacketprotocol.h \ $$PWD/qdeclarativedebugclient.h \ - $$PWD/qmljsdebugclient_global.h + $$PWD/qmljsdebugclient_global.h \ + $$PWD/qmlprofilertraceclient.h \ + $$PWD/qmlprofilereventtypes.h SOURCES += \ $$PWD/qdeclarativeenginedebug.cpp \ $$PWD/qpacketprotocol.cpp \ - $$PWD/qdeclarativedebugclient.cpp + $$PWD/qdeclarativedebugclient.cpp \ + $$PWD/qmlprofilertraceclient.cpp OTHER_FILES += \ $$PWD/qmljsdebugclient.pri \ diff --git a/src/plugins/qmlprofiler/qmlprofilereventtypes.h b/src/libs/qmljsdebugclient/qmlprofilereventtypes.h similarity index 96% rename from src/plugins/qmlprofiler/qmlprofilereventtypes.h rename to src/libs/qmljsdebugclient/qmlprofilereventtypes.h index 1739f90aefd..fb4805cf2bf 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventtypes.h +++ b/src/libs/qmljsdebugclient/qmlprofilereventtypes.h @@ -33,8 +33,7 @@ #ifndef QMLPROFILEREVENTTYPES_H #define QMLPROFILEREVENTTYPES_H -namespace QmlProfiler { -namespace Internal { +namespace QmlJsDebugClient { enum QmlEventType { Painting, @@ -46,7 +45,6 @@ enum QmlEventType { MaximumQmlEventType }; -} -} +} // namespace QmlJsDebugClient #endif //QMLPROFILEREVENTTYPES_H diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp b/src/libs/qmljsdebugclient/qmlprofilertraceclient.cpp similarity index 99% rename from src/plugins/qmlprofiler/qmlprofilertraceclient.cpp rename to src/libs/qmljsdebugclient/qmlprofilertraceclient.cpp index 9e663d7c21b..09ad672c2ac 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp +++ b/src/libs/qmljsdebugclient/qmlprofilertraceclient.cpp @@ -32,7 +32,6 @@ #include "qmlprofilertraceclient.h" -using namespace QmlProfiler::Internal; using namespace QmlJsDebugClient; static const int GAP_TIME = 150; diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.h b/src/libs/qmljsdebugclient/qmlprofilertraceclient.h similarity index 91% rename from src/plugins/qmlprofiler/qmlprofilertraceclient.h rename to src/libs/qmljsdebugclient/qmlprofilertraceclient.h index 827391143ae..efd86aea279 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceclient.h +++ b/src/libs/qmljsdebugclient/qmlprofilertraceclient.h @@ -33,16 +33,16 @@ #ifndef QMLPROFILERTRACECLIENT_H #define QMLPROFILERTRACECLIENT_H -#include +#include "qdeclarativedebugclient.h" +#include "qmlprofilereventtypes.h" +#include "qmljsdebugclient_global.h" + #include #include -#include "qmlprofilereventtypes.h" +namespace QmlJsDebugClient { -namespace QmlProfiler { -namespace Internal { - -struct Location +struct QMLJSDEBUGCLIENT_EXPORT Location { Location() : line(-1) {} Location(const QString &file, int lineNumber) : fileName(file), line(lineNumber) {} @@ -50,7 +50,7 @@ struct Location int line; }; -class QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient +class QMLJSDEBUGCLIENT_EXPORT QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient { Q_OBJECT Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged) @@ -116,7 +116,6 @@ private: int m_nestingInType[MaximumQmlEventType]; }; -} // namespace Internal -} // namespace QmlProfiler +} // namespace QmlJsDebugClient #endif // QMLPROFILERTRACECLIENT_H diff --git a/src/plugins/qmlprofiler/qmlprofiler.pro b/src/plugins/qmlprofiler/qmlprofiler.pro index 0b3ad3f024a..107acdcfc5a 100644 --- a/src/plugins/qmlprofiler/qmlprofiler.pro +++ b/src/plugins/qmlprofiler/qmlprofiler.pro @@ -26,7 +26,6 @@ SOURCES += \ localqmlprofilerrunner.cpp \ codaqmlprofilerrunner.cpp \ remotelinuxqmlprofilerrunner.cpp \ - qmlprofilertraceclient.cpp \ qmlprofilereventview.cpp \ qmlprofilerruncontrolfactory.cpp @@ -43,9 +42,7 @@ HEADERS += \ localqmlprofilerrunner.h \ codaqmlprofilerrunner.h \ remotelinuxqmlprofilerrunner.h \ - qmlprofilertraceclient.h \ qmlprofilereventview.h \ - qmlprofilereventtypes.h \ qmlprofilerruncontrolfactory.h RESOURCES += \ diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp index 62c990716ac..aa976937743 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp @@ -38,6 +38,8 @@ #include #include +using namespace QmlJsDebugClient; + namespace QmlProfiler { namespace Internal { diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.h b/src/plugins/qmlprofiler/qmlprofilereventview.h index 857c5058ae8..a04b6d3128a 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.h +++ b/src/plugins/qmlprofiler/qmlprofilereventview.h @@ -34,7 +34,7 @@ #define QMLPROFILEREVENTVIEW_H #include -#include "qmlprofilereventtypes.h" +#include namespace QmlProfiler { namespace Internal { @@ -42,7 +42,7 @@ namespace Internal { struct QmlEventData { QmlEventData() : displayname(0) , filename(0) , location(0) , details(0), - line(0), eventType(MaximumQmlEventType), level(-1), parentList(0), childrenList(0) {} + line(0), eventType(QmlJsDebugClient::MaximumQmlEventType), level(-1), parentList(0), childrenList(0) {} ~QmlEventData() { delete displayname; delete filename; @@ -55,7 +55,7 @@ struct QmlEventData QString *location; QString *details; int line; - QmlEventType eventType; + QmlJsDebugClient::QmlEventType eventType; qint64 level; QList< QmlEventData *> *parentList; QList< QmlEventData *> *childrenList; diff --git a/src/plugins/qmlprofiler/tracewindow.cpp b/src/plugins/qmlprofiler/tracewindow.cpp index 380a54d50f0..f3ab9722c1d 100644 --- a/src/plugins/qmlprofiler/tracewindow.cpp +++ b/src/plugins/qmlprofiler/tracewindow.cpp @@ -33,9 +33,9 @@ #include "tracewindow.h" #include "qmlprofilerplugin.h" -#include "qmlprofilertraceclient.h" #include +#include #include #include @@ -44,6 +44,8 @@ #include #include +using namespace QmlJsDebugClient; + namespace QmlProfiler { namespace Internal { @@ -112,7 +114,7 @@ TraceWindow::~TraceWindow() delete m_plugin.data(); } -void TraceWindow::reset(QmlJsDebugClient::QDeclarativeDebugConnection *conn) +void TraceWindow::reset(QDeclarativeDebugConnection *conn) { if (m_plugin) disconnect(m_plugin.data(), SIGNAL(complete()), this, SIGNAL(viewUpdated())); diff --git a/src/plugins/qmlprofiler/tracewindow.h b/src/plugins/qmlprofiler/tracewindow.h index ffd414d9ca7..5629f977f04 100644 --- a/src/plugins/qmlprofiler/tracewindow.h +++ b/src/plugins/qmlprofiler/tracewindow.h @@ -33,7 +33,7 @@ #ifndef TRACEWINDOW_H #define TRACEWINDOW_H -#include "qmlprofilertraceclient.h" +#include #include #include @@ -79,7 +79,7 @@ signals: void enableToolbar(bool); private: - QWeakPointer m_plugin; + QWeakPointer m_plugin; QSize m_sizeHint; QDeclarativeView *m_view;