aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2016-05-02 12:18:57 +0200
committerUlf Hermann <[email protected]>2016-05-03 15:00:50 +0000
commite5a38bacc4bcfd770f56122b86233ff35b0579ac (patch)
treedb03f5112d616cbab6f5b9401cf296fa759fa54b /src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
parent08655de4a5891ab3a8fe07970c826958be7c52fc (diff)
Move QmlProfiler specific files from qmldebug to qmlprofiler
These file were not used anywhere else and had no business to be in qmldebug to begin with. Moving them allows us to drop a number of namespace qualifications and forces us to rename a few local symbols in other classes in order to avoid name clashes. Change-Id: I658ed455eec027cbaddacf2980d2ea6827ae6205 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
index 644bda9f500..79d1c6ebb2f 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
@@ -54,7 +54,7 @@ public:
int modelId;
- QList<QmlDebug::RangeType> acceptedTypes;
+ QList<RangeType> acceptedTypes;
QSet<int> eventsInBindingLoop;
QHash<int, QString> notes;
};
@@ -73,9 +73,9 @@ QmlProfilerStatisticsModel::QmlProfilerStatisticsModel(QmlProfilerModelManager *
// We're iterating twice in loadData.
modelManager->setProxyCountWeight(d->modelId, 2);
- d->acceptedTypes << QmlDebug::Compiling << QmlDebug::Creating << QmlDebug::Binding << QmlDebug::HandlingSignal << QmlDebug::Javascript;
+ d->acceptedTypes << Compiling << Creating << Binding << HandlingSignal << Javascript;
- modelManager->announceFeatures(d->modelId, QmlDebug::Constants::QML_JS_RANGE_FEATURES);
+ modelManager->announceFeatures(d->modelId, Constants::QML_JS_RANGE_FEATURES);
}
QmlProfilerStatisticsModel::~QmlProfilerStatisticsModel()
@@ -83,7 +83,7 @@ QmlProfilerStatisticsModel::~QmlProfilerStatisticsModel()
delete d;
}
-void QmlProfilerStatisticsModel::setEventTypeAccepted(QmlDebug::RangeType type, bool accepted)
+void QmlProfilerStatisticsModel::setEventTypeAccepted(RangeType type, bool accepted)
{
if (accepted && !d->acceptedTypes.contains(type))
d->acceptedTypes << type;
@@ -91,7 +91,7 @@ void QmlProfilerStatisticsModel::setEventTypeAccepted(QmlDebug::RangeType type,
d->acceptedTypes.removeOne(type);
}
-bool QmlProfilerStatisticsModel::eventTypeAccepted(QmlDebug::RangeType type) const
+bool QmlProfilerStatisticsModel::eventTypeAccepted(RangeType type) const
{
return d->acceptedTypes.contains(type);
}
@@ -357,7 +357,7 @@ void QmlProfilerStatisticsParentsModel::loadData()
// for level computation
QHash<int, qint64> endtimesPerLevel;
- int level = QmlDebug::Constants::QML_MIN_LEVEL;
+ int level = Constants::QML_MIN_LEVEL;
endtimesPerLevel[0] = 0;
const QSet<int> &eventsInBindingLoop = m_statisticsModel->eventsInBindingLoop();
@@ -375,14 +375,14 @@ void QmlProfilerStatisticsParentsModel::loadData()
if (endtimesPerLevel[level] > event.startTime()) {
level++;
} else {
- while (level > QmlDebug::Constants::QML_MIN_LEVEL &&
+ while (level > Constants::QML_MIN_LEVEL &&
endtimesPerLevel[level-1] <= event.startTime())
level--;
}
endtimesPerLevel[level] = event.startTime() + event.duration();
int parentTypeIndex = -1;
- if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
+ if (level > Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentTypeIndex = lastParent[level-1];
QmlStatisticsRelativesMap &relativesMap = m_data[event.typeIndex()];
@@ -419,7 +419,7 @@ void QmlProfilerStatisticsChildrenModel::loadData()
// for level computation
QHash<int, qint64> endtimesPerLevel;
- int level = QmlDebug::Constants::QML_MIN_LEVEL;
+ int level = Constants::QML_MIN_LEVEL;
endtimesPerLevel[0] = 0;
const QSet<int> &eventsInBindingLoop = m_statisticsModel->eventsInBindingLoop();
@@ -437,7 +437,7 @@ void QmlProfilerStatisticsChildrenModel::loadData()
if (endtimesPerLevel[level] > event.startTime()) {
level++;
} else {
- while (level > QmlDebug::Constants::QML_MIN_LEVEL &&
+ while (level > Constants::QML_MIN_LEVEL &&
endtimesPerLevel[level-1] <= event.startTime())
level--;
}
@@ -445,7 +445,7 @@ void QmlProfilerStatisticsChildrenModel::loadData()
int parentId = -1;
- if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
+ if (level > Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentId = lastParent[level-1];
QmlStatisticsRelativesMap &relativesMap = m_data[parentId];