aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloader_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-09-05 15:23:05 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-09-06 11:38:05 +0000
commita88ca874970c57db275981a1a47a0bebb6b749a0 (patch)
treeb0f8a9e0e40c25b2741df536bb4ba2a8240443a3 /src/qml/qml/qqmltypeloader_p.h
parent131243b3c8d71febe5294f0035844cea8a9e3049 (diff)
Qml Tooling: Replace bare pointers with QScopedPointer
This way we don't have to manually initialize and delete them. Change-Id: I0104c744dba380e957271d0924498e3643856e9e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypeloader_p.h')
-rw-r--r--src/qml/qml/qqmltypeloader_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index 722791ea5a..c214f0cd43 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -249,7 +249,7 @@ private:
QString m_location;
};
-class Q_AUTOTEST_EXPORT QQmlTypeLoader
+class Q_QML_PRIVATE_EXPORT QQmlTypeLoader
{
Q_DECLARE_TR_FUNCTIONS(QQmlTypeLoader)
public:
@@ -325,8 +325,8 @@ public:
QQmlProfiler *profiler() const { return nullptr; }
void setProfiler(QQmlProfiler *) {}
#else
- QQmlProfiler *profiler() const { return m_profiler; }
- void setProfiler(QQmlProfiler *profiler) { Q_ASSERT(!m_profiler); m_profiler = profiler; }
+ QQmlProfiler *profiler() const { return m_profiler.data(); }
+ void setProfiler(QQmlProfiler *profiler);
#endif // QT_NO_QML_DEBUGGER
@@ -380,7 +380,7 @@ private:
QQmlTypeLoaderThread *m_thread;
#ifndef QT_NO_QML_DEBUGGER
- QQmlProfiler *m_profiler;
+ QScopedPointer<QQmlProfiler> m_profiler;
#endif
#if QT_CONFIG(qml_network)