forked from qt-creator/qt-creator
QmlProfiler: Namespace fixes
Use own namespace (QmlProfiler) instead of Analyzer.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include <unistd.h> // sleep
|
||||
#endif
|
||||
|
||||
using namespace Analyzer::Internal;
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
class QmlProfilerEngine::QmlProfilerEnginePrivate
|
||||
{
|
||||
@@ -88,7 +88,7 @@ void QmlProfilerEngine::stop()
|
||||
|
||||
void QmlProfilerEngine::spontaneousStop()
|
||||
{
|
||||
AnalyzerManager::instance()->stopTool();
|
||||
Analyzer::AnalyzerManager::instance()->stopTool();
|
||||
}
|
||||
|
||||
void QmlProfilerEngine::viewUpdated()
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#ifndef QMLPROFILERENGINE_H
|
||||
#define QMLPROFILERENGINE_H
|
||||
|
||||
#include "ianalyzerengine.h"
|
||||
#include <analyzerbase/ianalyzerengine.h>
|
||||
|
||||
namespace Analyzer {
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
class QmlProfilerEngine : public IAnalyzerEngine
|
||||
class QmlProfilerEngine : public Analyzer::IAnalyzerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -31,7 +30,7 @@ private:
|
||||
QmlProfilerEnginePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
#endif // QMLPROFILERENGINE_H
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "qmlprofilertool.h"
|
||||
|
||||
using namespace Analyzer;
|
||||
using namespace Analyzer::Internal;
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
QmlProfilerPlugin *QmlProfilerPlugin::m_instance = 0;
|
||||
bool QmlProfilerPlugin::debugOutput = false;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace Analyzer {
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class QmlProfilerPlugin : public ExtensionSystem::IPlugin
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Analyzer
|
||||
} // namespace QmlProfiler
|
||||
|
||||
#endif // QMLPROFILERPLUGIN_H
|
||||
|
||||
|
||||
@@ -28,9 +28,8 @@
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
|
||||
using namespace Analyzer;
|
||||
using namespace Analyzer::Internal;
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
QString QmlProfilerTool::host = QLatin1String("localhost");
|
||||
quint16 QmlProfilerTool::port = 33456;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef QMLPROFILERTOOL_H
|
||||
#define QMLPROFILERTOOL_H
|
||||
|
||||
#include "ianalyzertool.h"
|
||||
#include "ianalyzerengine.h"
|
||||
#include <analyzerbase/ianalyzertool.h>
|
||||
#include <analyzerbase/ianalyzerengine.h>
|
||||
|
||||
namespace Analyzer {
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class QmlProfilerTool : public IAnalyzerTool
|
||||
class QmlProfilerTool : public Analyzer::IAnalyzerTool
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -20,9 +20,9 @@ public:
|
||||
|
||||
void initialize(ExtensionSystem::IPlugin *plugin);
|
||||
|
||||
IAnalyzerEngine *createEngine(ProjectExplorer::RunConfiguration *runConfiguration);
|
||||
Analyzer::IAnalyzerEngine *createEngine(ProjectExplorer::RunConfiguration *runConfiguration);
|
||||
|
||||
IAnalyzerOutputPaneAdapter *outputPaneAdapter();
|
||||
Analyzer::IAnalyzerOutputPaneAdapter *outputPaneAdapter();
|
||||
QWidget *createToolBarWidget();
|
||||
QWidget *createTimeLineWidget();
|
||||
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
QmlProfilerToolPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
#endif // QMLPROFILERTOOL_H
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <qdeclarativecontext.h>
|
||||
#include <qdeclarativeproperty.h>
|
||||
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
TimelineView::TimelineView(QDeclarativeItem *parent) :
|
||||
QDeclarativeItem(parent), m_delegate(0), m_startTime(0), m_endTime(0), m_startX(0),
|
||||
prevMin(0), prevMax(0), m_totalWidth(0)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#ifndef TIMELINEVIEW_H
|
||||
#define TIMELINEVIEW_H
|
||||
|
||||
#include <QDeclarativeItem>
|
||||
#include <QScriptValue>
|
||||
#include <QtDeclarative/QDeclarativeItem>
|
||||
#include <QtScript/QScriptValue>
|
||||
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class TimelineView : public QDeclarativeItem
|
||||
{
|
||||
@@ -104,6 +107,9 @@ private:
|
||||
qreal m_totalWidth;
|
||||
};
|
||||
|
||||
QML_DECLARE_TYPE(TimelineView)
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
QML_DECLARE_TYPE(QmlProfiler::Internal::TimelineView)
|
||||
|
||||
#endif // TIMELINEVIEW_H
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
|
||||
#define GAP_TIME 150
|
||||
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
struct Location
|
||||
{
|
||||
Location() : line(-1) {}
|
||||
@@ -131,6 +134,11 @@ private:
|
||||
bool m_recording;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
TracePlugin::TracePlugin(QDeclarativeDebugConnection *client)
|
||||
: QDeclarativeDebugClient(QLatin1String("CanvasFrameRate"), client), m_inProgressRanges(0), m_maximumTime(0), m_recording(false)
|
||||
{
|
||||
@@ -252,7 +260,7 @@ TraceWindow::TraceWindow(QWidget *parent)
|
||||
|
||||
m_view = new QDeclarativeView(this);
|
||||
|
||||
if (Analyzer::Internal::QmlProfilerPlugin::debugOutput) {
|
||||
if (QmlProfilerPlugin::debugOutput) {
|
||||
//new QmlJSDebugger::JSDebuggerAgent(m_view->engine());
|
||||
//new QmlJSDebugger::QDeclarativeViewObserver(m_view, m_view);
|
||||
}
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
#ifndef CANVASFRAMERATE_H
|
||||
#define CANVASFRAMERATE_H
|
||||
|
||||
#include <private/qdeclarativedebugclient_p.h>
|
||||
|
||||
#include <QtCore/qpointer.h>
|
||||
#include <QtGui/qwidget.h>
|
||||
|
||||
#include <QtDeclarative/private/qdeclarativedebugclient_p.h>
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTabWidget;
|
||||
class QSlider;
|
||||
@@ -44,6 +45,9 @@ class QPushButton;
|
||||
class QDeclarativeView;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class TracePlugin;
|
||||
|
||||
class TraceWindow : public QWidget
|
||||
@@ -75,5 +79,8 @@ private:
|
||||
QDeclarativeView *m_view;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
#endif // CANVASFRAMERATE_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user