mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
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>
This commit is contained in:
parent
56fda691ec
commit
32eeb51305
1 changed files with 4 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue