QmlProfiler: Eliminate QmlProfilerDataState

This class is only accessible through the model manager and there is no
real point in keeping it separate.

Change-Id: I575d47c08aa8f6731d44739f9604072b95fd1dcd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-09-10 13:51:54 +02:00
parent f373c6794e
commit ddb872727f
6 changed files with 70 additions and 108 deletions

View File

@@ -46,35 +46,6 @@ class QmlProfilerNotesModel;
namespace Internal {
class QmlProfilerDataState : public QObject
{
Q_OBJECT
public:
enum State {
Empty,
AcquiringData,
ProcessingData,
ClearingData,
Done
};
explicit QmlProfilerDataState(QmlProfilerModelManager *modelManager, QObject *parent = 0);
~QmlProfilerDataState() {}
State state() const { return m_state; }
signals:
void stateChanged();
void error(const QString &error);
private:
void setState(State state);
State m_state;
QmlProfilerModelManager *m_modelManager;
friend class QmlProfiler::QmlProfilerModelManager;
};
class QMLPROFILER_EXPORT QmlProfilerTraceTime : public QObject
{
Q_OBJECT
@@ -110,11 +81,18 @@ class QMLPROFILER_EXPORT QmlProfilerModelManager : public QObject
{
Q_OBJECT
public:
enum State {
Empty,
AcquiringData,
ProcessingData,
ClearingData,
Done
};
explicit QmlProfilerModelManager(Utils::FileInProjectFinder *finder, QObject *parent = 0);
~QmlProfilerModelManager();
QmlProfilerDataState::State state() const;
State state() const;
QmlProfilerTraceTime *traceTime() const;
QmlProfilerDataModel *qmlModel() const;
QmlProfilerNotesModel *notesModel() const;
@@ -162,8 +140,7 @@ public slots:
void load(const QString &filename);
private:
void setState(QmlProfilerDataState::State state);
void setState(State state);
private:
class QmlProfilerModelManagerPrivate;