diff options
author | jan Iversen <jani@apache.org> | 2018-09-12 12:22:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-12 05:29:34 -0700 |
commit | 32eeb5130583c5f861d5ab8c9c77ecab2b34ae0e (patch) | |
tree | 59eb4d7e85e3caa9283b424ebbdb73e12d6e28d0 /subsurface-helper.cpp | |
parent | 56fda691ec38431f5982511152e007a7862ebb15 (diff) | |
download | subsurface-32eeb5130583c5f861d5ab8c9c77ecab2b34ae0e.tar.gz |
Ssrf: correct mapWidget registration for desktop version
Registration was after the mainwindow was created.
Move registration back to before creation.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r-- | subsurface-helper.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index f261f3e1f..980ddd433 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -31,12 +31,16 @@ #ifndef SUBSURFACE_TEST_DATA QObject *qqWindowObject = NULL; +// Forward declaration +static void register_qml_types(QQmlEngine *); static void register_meta_types(); + void init_ui() { init_qt_late(); register_meta_types(); #ifndef SUBSURFACE_MOBILE + register_qml_types(NULL); PluginManager::instance().loadPlugins(); MainWindow *window = new MainWindow(); @@ -59,8 +63,6 @@ double get_screen_dpi() return mydesk->physicalDpiX(); } -// Forward declaration -static void register_qml_types(QQmlEngine *); void run_ui() { @@ -138,7 +140,6 @@ void run_ui() qml_window->show(); LOG_STP("run_ui running exec"); #else - register_qml_types(NULL); MainWindow::instance()->show(); #endif // SUBSURFACE_MOBILE qApp->exec(); |