Skip to content
Snippets Groups Projects
Commit ac61c9a9 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlProfiler: Namespace fixes

Use own namespace (QmlProfiler) instead of Analyzer.
parent 76a5abf6
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <unistd.h> // sleep #include <unistd.h> // sleep
#endif #endif
using namespace Analyzer::Internal; using namespace QmlProfiler::Internal;
class QmlProfilerEngine::QmlProfilerEnginePrivate class QmlProfilerEngine::QmlProfilerEnginePrivate
{ {
...@@ -88,7 +88,7 @@ void QmlProfilerEngine::stop() ...@@ -88,7 +88,7 @@ void QmlProfilerEngine::stop()
void QmlProfilerEngine::spontaneousStop() void QmlProfilerEngine::spontaneousStop()
{ {
AnalyzerManager::instance()->stopTool(); Analyzer::AnalyzerManager::instance()->stopTool();
} }
void QmlProfilerEngine::viewUpdated() void QmlProfilerEngine::viewUpdated()
......
#ifndef QMLPROFILERENGINE_H #ifndef QMLPROFILERENGINE_H
#define QMLPROFILERENGINE_H #define QMLPROFILERENGINE_H
#include "ianalyzerengine.h" #include <analyzerbase/ianalyzerengine.h>
namespace Analyzer { namespace QmlProfiler {
namespace Internal { namespace Internal {
class QmlProfilerEngine : public Analyzer::IAnalyzerEngine
class QmlProfilerEngine : public IAnalyzerEngine
{ {
Q_OBJECT Q_OBJECT
public: public:
...@@ -31,7 +30,7 @@ private: ...@@ -31,7 +30,7 @@ private:
QmlProfilerEnginePrivate *d; QmlProfilerEnginePrivate *d;
}; };
} } // namespace Internal
} } // namespace QmlProfiler
#endif // QMLPROFILERENGINE_H #endif // QMLPROFILERENGINE_H
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "qmlprofilertool.h" #include "qmlprofilertool.h"
using namespace Analyzer; using namespace Analyzer;
using namespace Analyzer::Internal; using namespace QmlProfiler::Internal;
QmlProfilerPlugin *QmlProfilerPlugin::m_instance = 0; QmlProfilerPlugin *QmlProfilerPlugin::m_instance = 0;
bool QmlProfilerPlugin::debugOutput = false; bool QmlProfilerPlugin::debugOutput = false;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
namespace Analyzer { namespace QmlProfiler {
namespace Internal { namespace Internal {
class QmlProfilerPlugin : public ExtensionSystem::IPlugin class QmlProfilerPlugin : public ExtensionSystem::IPlugin
...@@ -32,7 +32,7 @@ private: ...@@ -32,7 +32,7 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Analyzer } // namespace QmlProfiler
#endif // QMLPROFILERPLUGIN_H #endif // QMLPROFILERPLUGIN_H
...@@ -28,9 +28,8 @@ ...@@ -28,9 +28,8 @@
#include <QtGui/QHBoxLayout> #include <QtGui/QHBoxLayout>
#include <QtGui/QLabel> #include <QtGui/QLabel>
using namespace Analyzer; using namespace Analyzer;
using namespace Analyzer::Internal; using namespace QmlProfiler::Internal;
QString QmlProfilerTool::host = QLatin1String("localhost"); QString QmlProfilerTool::host = QLatin1String("localhost");
quint16 QmlProfilerTool::port = 33456; quint16 QmlProfilerTool::port = 33456;
......
#ifndef QMLPROFILERTOOL_H #ifndef QMLPROFILERTOOL_H
#define QMLPROFILERTOOL_H #define QMLPROFILERTOOL_H
#include "ianalyzertool.h" #include <analyzerbase/ianalyzertool.h>
#include "ianalyzerengine.h" #include <analyzerbase/ianalyzerengine.h>
namespace Analyzer { namespace QmlProfiler {
namespace Internal { namespace Internal {
class QmlProfilerTool : public IAnalyzerTool class QmlProfilerTool : public Analyzer::IAnalyzerTool
{ {
Q_OBJECT Q_OBJECT
public: public:
...@@ -20,9 +20,9 @@ public: ...@@ -20,9 +20,9 @@ public:
void initialize(ExtensionSystem::IPlugin *plugin); void initialize(ExtensionSystem::IPlugin *plugin);
IAnalyzerEngine *createEngine(ProjectExplorer::RunConfiguration *runConfiguration); Analyzer::IAnalyzerEngine *createEngine(ProjectExplorer::RunConfiguration *runConfiguration);
IAnalyzerOutputPaneAdapter *outputPaneAdapter(); Analyzer::IAnalyzerOutputPaneAdapter *outputPaneAdapter();
QWidget *createToolBarWidget(); QWidget *createToolBarWidget();
QWidget *createTimeLineWidget(); QWidget *createTimeLineWidget();
...@@ -48,7 +48,7 @@ private: ...@@ -48,7 +48,7 @@ private:
QmlProfilerToolPrivate *d; QmlProfilerToolPrivate *d;
}; };
} } // namespace Internal
} } // namespace QmlProfiler
#endif // QMLPROFILERTOOL_H #endif // QMLPROFILERTOOL_H
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#include <qdeclarativecontext.h> #include <qdeclarativecontext.h>
#include <qdeclarativeproperty.h> #include <qdeclarativeproperty.h>
using namespace QmlProfiler::Internal;
TimelineView::TimelineView(QDeclarativeItem *parent) : TimelineView::TimelineView(QDeclarativeItem *parent) :
QDeclarativeItem(parent), m_delegate(0), m_startTime(0), m_endTime(0), m_startX(0), QDeclarativeItem(parent), m_delegate(0), m_startTime(0), m_endTime(0), m_startX(0),
prevMin(0), prevMax(0), m_totalWidth(0) prevMin(0), prevMax(0), m_totalWidth(0)
......
#ifndef TIMELINEVIEW_H #ifndef TIMELINEVIEW_H
#define TIMELINEVIEW_H #define TIMELINEVIEW_H
#include <QDeclarativeItem> #include <QtDeclarative/QDeclarativeItem>
#include <QScriptValue> #include <QtScript/QScriptValue>
namespace QmlProfiler {
namespace Internal {
class TimelineView : public QDeclarativeItem class TimelineView : public QDeclarativeItem
{ {
...@@ -104,6 +107,9 @@ private: ...@@ -104,6 +107,9 @@ private:
qreal m_totalWidth; qreal m_totalWidth;
}; };
QML_DECLARE_TYPE(TimelineView) } // namespace Internal
} // namespace QmlProfiler
QML_DECLARE_TYPE(QmlProfiler::Internal::TimelineView)
#endif // TIMELINEVIEW_H #endif // TIMELINEVIEW_H
...@@ -52,6 +52,9 @@ ...@@ -52,6 +52,9 @@
#define GAP_TIME 150 #define GAP_TIME 150
namespace QmlProfiler {
namespace Internal {
struct Location struct Location
{ {
Location() : line(-1) {} Location() : line(-1) {}
...@@ -131,6 +134,11 @@ private: ...@@ -131,6 +134,11 @@ private:
bool m_recording; bool m_recording;
}; };
} // namespace Internal
} // namespace QmlProfiler
using namespace QmlProfiler::Internal;
TracePlugin::TracePlugin(QDeclarativeDebugConnection *client) TracePlugin::TracePlugin(QDeclarativeDebugConnection *client)
: QDeclarativeDebugClient(QLatin1String("CanvasFrameRate"), client), m_inProgressRanges(0), m_maximumTime(0), m_recording(false) : QDeclarativeDebugClient(QLatin1String("CanvasFrameRate"), client), m_inProgressRanges(0), m_maximumTime(0), m_recording(false)
{ {
...@@ -252,7 +260,7 @@ TraceWindow::TraceWindow(QWidget *parent) ...@@ -252,7 +260,7 @@ TraceWindow::TraceWindow(QWidget *parent)
m_view = new QDeclarativeView(this); m_view = new QDeclarativeView(this);
if (Analyzer::Internal::QmlProfilerPlugin::debugOutput) { if (QmlProfilerPlugin::debugOutput) {
//new QmlJSDebugger::JSDebuggerAgent(m_view->engine()); //new QmlJSDebugger::JSDebuggerAgent(m_view->engine());
//new QmlJSDebugger::QDeclarativeViewObserver(m_view, m_view); //new QmlJSDebugger::QDeclarativeViewObserver(m_view, m_view);
} }
......
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
#ifndef CANVASFRAMERATE_H #ifndef CANVASFRAMERATE_H
#define CANVASFRAMERATE_H #define CANVASFRAMERATE_H
#include <private/qdeclarativedebugclient_p.h>
#include <QtCore/qpointer.h> #include <QtCore/qpointer.h>
#include <QtGui/qwidget.h> #include <QtGui/qwidget.h>
#include <QtDeclarative/private/qdeclarativedebugclient_p.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QTabWidget; class QTabWidget;
class QSlider; class QSlider;
...@@ -44,6 +45,9 @@ class QPushButton; ...@@ -44,6 +45,9 @@ class QPushButton;
class QDeclarativeView; class QDeclarativeView;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlProfiler {
namespace Internal {
class TracePlugin; class TracePlugin;
class TraceWindow : public QWidget class TraceWindow : public QWidget
...@@ -75,5 +79,8 @@ private: ...@@ -75,5 +79,8 @@ private:
QDeclarativeView *m_view; QDeclarativeView *m_view;
}; };
} // namespace Internal
} // namespace QmlProfiler
#endif // CANVASFRAMERATE_H #endif // CANVASFRAMERATE_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment