diff options
author | Ulf Hermann <[email protected]> | 2016-07-20 15:35:50 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2016-07-28 09:17:49 +0000 |
commit | bd48f0e5edb1d5ce10529360fb9d14e7b7135022 (patch) | |
tree | 8fd715131155292216389845ffe78ec9fbd43b69 /src/quick | |
parent | b096d9e4e7187a1965bd15d1c5a55f228ec3ae00 (diff) |
Tooling: Convert connects to Qt5 style
Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/util/qquickprofiler.cpp | 9 | ||||
-rw-r--r-- | src/quick/util/qquickprofiler_p.h | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/quick/util/qquickprofiler.cpp b/src/quick/util/qquickprofiler.cpp index 659ffe1d84..841a1c9bcf 100644 --- a/src/quick/util/qquickprofiler.cpp +++ b/src/quick/util/qquickprofiler.cpp @@ -70,7 +70,7 @@ void QQuickProfiler::registerAnimationCallback() class CallbackRegistrationHelper : public QObject { Q_OBJECT -public slots: +public: void registerAnimationTimerCallback() { QQuickProfiler::registerAnimationCallback(); @@ -86,7 +86,12 @@ QQuickProfiler::QQuickProfiler(QObject *parent) : QObject(parent) m_timer.start(); CallbackRegistrationHelper *helper = new CallbackRegistrationHelper; // will delete itself helper->moveToThread(QCoreApplication::instance()->thread()); - QMetaObject::invokeMethod(helper, "registerAnimationTimerCallback", Qt::QueuedConnection); + + // Queue the signal to have the animation timer registration run in the right thread; + QObject signalSource; + connect(&signalSource, &QObject::destroyed, + helper, &CallbackRegistrationHelper::registerAnimationTimerCallback, + Qt::QueuedConnection); } QQuickProfiler::~QQuickProfiler() diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h index 54d734a1c2..480a2ac3fb 100644 --- a/src/quick/util/qquickprofiler_p.h +++ b/src/quick/util/qquickprofiler_p.h @@ -325,6 +325,9 @@ public: virtual ~QQuickProfiler(); +signals: + void dataReady(const QVector<QQuickProfilerData> &data); + protected: friend class QQuickProfilerAdapter; @@ -342,10 +345,6 @@ protected: m_data.append(message); } -signals: - void dataReady(const QVector<QQuickProfilerData> &data); - -protected slots: void startProfilingImpl(quint64 features); void stopProfilingImpl(); void reportDataImpl(bool trackLocations); |