summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2017-03-13 01:42:09 +0100
committerThomas Senyk <thomas.senyk@pelagicore.com>2017-03-14 13:37:42 +0000
commit46ccd08c81150c38962aeea6ff7facdf26d2a97f (patch)
tree2e4b661813d67af7d81dd65c4f2e673bf785b9c7
parenta958bdb189c6751e3eb7d7c97d0d07857a3676e1 (diff)
downloadqtapplicationmanager-46ccd08c81150c38962aeea6ff7facdf26d2a97f.tar.gz
Workaround for MSVC2013 bug
You need to explicitly capture 'this', if you only want to call a static member function of the class. Since here 'this' is the same as qApp, we can still get away without a capture. Change-Id: I9c04256a7eb27ba32a8b1c1b2a2899345ecbb497 Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
-rw-r--r--src/manager/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/manager/main.cpp b/src/manager/main.cpp
index 90b22b2d..b1c9ac01 100644
--- a/src/manager/main.cpp
+++ b/src/manager/main.cpp
@@ -694,7 +694,11 @@ void Main::showWindow()
static QMetaObject::Connection conn = QObject::connect(window, &QQuickWindow::frameSwapped, this, []() {
// this is a queued signal, so there may be still one in the queue after calling disconnect()
if (conn) {
+#if defined(Q_CC_MSVC)
+ qApp->disconnect(conn); // MSVC2013 cannot call static member functions without capturing this
+#else
QObject::disconnect(conn);
+#endif
StartupTimer::instance()->checkpoint("after first frame drawn");
StartupTimer::instance()->createReport(qSL("System UI"));
}