forked from qt-creator/qt-creator
QmlJSDebugClient: Move QmlProfilerTraceClient into library
Change-Id: I1c0821778a3350ec55741b45680fca2cb1fed3aa Reviewed-on: http://codereview.qt.nokia.com/2680 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -10,12 +10,15 @@ HEADERS += \
|
|||||||
$$PWD/qdeclarativeenginedebug.h \
|
$$PWD/qdeclarativeenginedebug.h \
|
||||||
$$PWD/qpacketprotocol.h \
|
$$PWD/qpacketprotocol.h \
|
||||||
$$PWD/qdeclarativedebugclient.h \
|
$$PWD/qdeclarativedebugclient.h \
|
||||||
$$PWD/qmljsdebugclient_global.h
|
$$PWD/qmljsdebugclient_global.h \
|
||||||
|
$$PWD/qmlprofilertraceclient.h \
|
||||||
|
$$PWD/qmlprofilereventtypes.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qdeclarativeenginedebug.cpp \
|
$$PWD/qdeclarativeenginedebug.cpp \
|
||||||
$$PWD/qpacketprotocol.cpp \
|
$$PWD/qpacketprotocol.cpp \
|
||||||
$$PWD/qdeclarativedebugclient.cpp
|
$$PWD/qdeclarativedebugclient.cpp \
|
||||||
|
$$PWD/qmlprofilertraceclient.cpp
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
$$PWD/qmljsdebugclient.pri \
|
$$PWD/qmljsdebugclient.pri \
|
||||||
|
|||||||
@@ -33,8 +33,7 @@
|
|||||||
#ifndef QMLPROFILEREVENTTYPES_H
|
#ifndef QMLPROFILEREVENTTYPES_H
|
||||||
#define QMLPROFILEREVENTTYPES_H
|
#define QMLPROFILEREVENTTYPES_H
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlJsDebugClient {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
enum QmlEventType {
|
enum QmlEventType {
|
||||||
Painting,
|
Painting,
|
||||||
@@ -46,7 +45,6 @@ enum QmlEventType {
|
|||||||
MaximumQmlEventType
|
MaximumQmlEventType
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace QmlJsDebugClient
|
||||||
}
|
|
||||||
|
|
||||||
#endif //QMLPROFILEREVENTTYPES_H
|
#endif //QMLPROFILEREVENTTYPES_H
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include "qmlprofilertraceclient.h"
|
#include "qmlprofilertraceclient.h"
|
||||||
|
|
||||||
using namespace QmlProfiler::Internal;
|
|
||||||
using namespace QmlJsDebugClient;
|
using namespace QmlJsDebugClient;
|
||||||
|
|
||||||
static const int GAP_TIME = 150;
|
static const int GAP_TIME = 150;
|
||||||
@@ -33,16 +33,16 @@
|
|||||||
#ifndef QMLPROFILERTRACECLIENT_H
|
#ifndef QMLPROFILERTRACECLIENT_H
|
||||||
#define QMLPROFILERTRACECLIENT_H
|
#define QMLPROFILERTRACECLIENT_H
|
||||||
|
|
||||||
#include <qmljsdebugclient/qdeclarativedebugclient.h>
|
#include "qdeclarativedebugclient.h"
|
||||||
|
#include "qmlprofilereventtypes.h"
|
||||||
|
#include "qmljsdebugclient_global.h"
|
||||||
|
|
||||||
#include <QtCore/QStack>
|
#include <QtCore/QStack>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
#include "qmlprofilereventtypes.h"
|
namespace QmlJsDebugClient {
|
||||||
|
|
||||||
namespace QmlProfiler {
|
struct QMLJSDEBUGCLIENT_EXPORT Location
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
struct Location
|
|
||||||
{
|
{
|
||||||
Location() : line(-1) {}
|
Location() : line(-1) {}
|
||||||
Location(const QString &file, int lineNumber) : fileName(file), line(lineNumber) {}
|
Location(const QString &file, int lineNumber) : fileName(file), line(lineNumber) {}
|
||||||
@@ -50,7 +50,7 @@ struct Location
|
|||||||
int line;
|
int line;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient
|
class QMLJSDEBUGCLIENT_EXPORT QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged)
|
Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged)
|
||||||
@@ -116,7 +116,6 @@ private:
|
|||||||
int m_nestingInType[MaximumQmlEventType];
|
int m_nestingInType[MaximumQmlEventType];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace QmlJsDebugClient
|
||||||
} // namespace QmlProfiler
|
|
||||||
|
|
||||||
#endif // QMLPROFILERTRACECLIENT_H
|
#endif // QMLPROFILERTRACECLIENT_H
|
||||||
@@ -26,7 +26,6 @@ SOURCES += \
|
|||||||
localqmlprofilerrunner.cpp \
|
localqmlprofilerrunner.cpp \
|
||||||
codaqmlprofilerrunner.cpp \
|
codaqmlprofilerrunner.cpp \
|
||||||
remotelinuxqmlprofilerrunner.cpp \
|
remotelinuxqmlprofilerrunner.cpp \
|
||||||
qmlprofilertraceclient.cpp \
|
|
||||||
qmlprofilereventview.cpp \
|
qmlprofilereventview.cpp \
|
||||||
qmlprofilerruncontrolfactory.cpp
|
qmlprofilerruncontrolfactory.cpp
|
||||||
|
|
||||||
@@ -43,9 +42,7 @@ HEADERS += \
|
|||||||
localqmlprofilerrunner.h \
|
localqmlprofilerrunner.h \
|
||||||
codaqmlprofilerrunner.h \
|
codaqmlprofilerrunner.h \
|
||||||
remotelinuxqmlprofilerrunner.h \
|
remotelinuxqmlprofilerrunner.h \
|
||||||
qmlprofilertraceclient.h \
|
|
||||||
qmlprofilereventview.h \
|
qmlprofilereventview.h \
|
||||||
qmlprofilereventtypes.h \
|
|
||||||
qmlprofilerruncontrolfactory.h
|
qmlprofilerruncontrolfactory.h
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
#include <QtGui/QHeaderView>
|
#include <QtGui/QHeaderView>
|
||||||
#include <QtGui/QStandardItemModel>
|
#include <QtGui/QStandardItemModel>
|
||||||
|
|
||||||
|
using namespace QmlJsDebugClient;
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#define QMLPROFILEREVENTVIEW_H
|
#define QMLPROFILEREVENTVIEW_H
|
||||||
|
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include "qmlprofilereventtypes.h"
|
#include <qmljsdebugclient/qmlprofilereventtypes.h>
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -42,7 +42,7 @@ namespace Internal {
|
|||||||
struct QmlEventData
|
struct QmlEventData
|
||||||
{
|
{
|
||||||
QmlEventData() : displayname(0) , filename(0) , location(0) , details(0),
|
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() {
|
~QmlEventData() {
|
||||||
delete displayname;
|
delete displayname;
|
||||||
delete filename;
|
delete filename;
|
||||||
@@ -55,7 +55,7 @@ struct QmlEventData
|
|||||||
QString *location;
|
QString *location;
|
||||||
QString *details;
|
QString *details;
|
||||||
int line;
|
int line;
|
||||||
QmlEventType eventType;
|
QmlJsDebugClient::QmlEventType eventType;
|
||||||
qint64 level;
|
qint64 level;
|
||||||
QList< QmlEventData *> *parentList;
|
QList< QmlEventData *> *parentList;
|
||||||
QList< QmlEventData *> *childrenList;
|
QList< QmlEventData *> *childrenList;
|
||||||
|
|||||||
@@ -33,9 +33,9 @@
|
|||||||
#include "tracewindow.h"
|
#include "tracewindow.h"
|
||||||
|
|
||||||
#include "qmlprofilerplugin.h"
|
#include "qmlprofilerplugin.h"
|
||||||
#include "qmlprofilertraceclient.h"
|
|
||||||
|
|
||||||
#include <qmljsdebugclient/qdeclarativedebugclient.h>
|
#include <qmljsdebugclient/qdeclarativedebugclient.h>
|
||||||
|
#include <qmljsdebugclient/qmlprofilertraceclient.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
|
|
||||||
#include <QtDeclarative/QDeclarativeView>
|
#include <QtDeclarative/QDeclarativeView>
|
||||||
@@ -44,6 +44,8 @@
|
|||||||
#include <QtGui/QToolButton>
|
#include <QtGui/QToolButton>
|
||||||
#include <QtGui/QGraphicsObject>
|
#include <QtGui/QGraphicsObject>
|
||||||
|
|
||||||
|
using namespace QmlJsDebugClient;
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -112,7 +114,7 @@ TraceWindow::~TraceWindow()
|
|||||||
delete m_plugin.data();
|
delete m_plugin.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TraceWindow::reset(QmlJsDebugClient::QDeclarativeDebugConnection *conn)
|
void TraceWindow::reset(QDeclarativeDebugConnection *conn)
|
||||||
{
|
{
|
||||||
if (m_plugin)
|
if (m_plugin)
|
||||||
disconnect(m_plugin.data(), SIGNAL(complete()), this, SIGNAL(viewUpdated()));
|
disconnect(m_plugin.data(), SIGNAL(complete()), this, SIGNAL(viewUpdated()));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#ifndef TRACEWINDOW_H
|
#ifndef TRACEWINDOW_H
|
||||||
#define TRACEWINDOW_H
|
#define TRACEWINDOW_H
|
||||||
|
|
||||||
#include "qmlprofilertraceclient.h"
|
#include <qmljsdebugclient/qmlprofilertraceclient.h>
|
||||||
|
|
||||||
#include <QtCore/QPointer>
|
#include <QtCore/QPointer>
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
@@ -79,7 +79,7 @@ signals:
|
|||||||
void enableToolbar(bool);
|
void enableToolbar(bool);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWeakPointer<QmlProfilerTraceClient> m_plugin;
|
QWeakPointer<QmlJsDebugClient::QmlProfilerTraceClient> m_plugin;
|
||||||
QSize m_sizeHint;
|
QSize m_sizeHint;
|
||||||
|
|
||||||
QDeclarativeView *m_view;
|
QDeclarativeView *m_view;
|
||||||
|
|||||||
Reference in New Issue
Block a user