forked from qt-creator/qt-creator
QmlProfiler: Avoid structs with default values
gcc 4.9 and msvc 2015 choke when creating those from initializer lists. Change-Id: I85936fe33418d5d9ffeb3c910392ad43fbb9a9bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Ulf Hermann
parent
1155601da5
commit
c637c66ebb
@@ -113,9 +113,11 @@ class QmlProfilerStatisticsRelativesModel : public QObject
|
||||
public:
|
||||
|
||||
struct QmlStatisticsRelativesData {
|
||||
qint64 duration = 0;
|
||||
qint64 calls = 0;
|
||||
bool isRecursive = false;
|
||||
QmlStatisticsRelativesData(qint64 duration = 0, qint64 calls = 0, bool isRecursive = false)
|
||||
: duration(duration), calls(calls), isRecursive(isRecursive) {}
|
||||
qint64 duration;
|
||||
qint64 calls;
|
||||
bool isRecursive;
|
||||
};
|
||||
typedef QHash <int, QmlStatisticsRelativesData> QmlStatisticsRelativesMap;
|
||||
|
||||
@@ -141,8 +143,9 @@ protected:
|
||||
QPointer<QmlProfilerModelManager> m_modelManager;
|
||||
|
||||
struct Frame {
|
||||
qint64 startTime = 0;
|
||||
int typeId = -1;
|
||||
Frame(qint64 startTime = 0, int typeId = -1) : startTime(startTime), typeId(typeId) {}
|
||||
qint64 startTime;
|
||||
int typeId;
|
||||
};
|
||||
QStack<Frame> m_callStack;
|
||||
QStack<Frame> m_compileStack;
|
||||
|
||||
Reference in New Issue
Block a user