mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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
|
#ifndef SUBSURFACE_TEST_DATA
|
||||||
QObject *qqWindowObject = NULL;
|
QObject *qqWindowObject = NULL;
|
||||||
|
|
||||||
|
// Forward declaration
|
||||||
|
static void register_qml_types(QQmlEngine *);
|
||||||
static void register_meta_types();
|
static void register_meta_types();
|
||||||
|
|
||||||
void init_ui()
|
void init_ui()
|
||||||
{
|
{
|
||||||
init_qt_late();
|
init_qt_late();
|
||||||
register_meta_types();
|
register_meta_types();
|
||||||
#ifndef SUBSURFACE_MOBILE
|
#ifndef SUBSURFACE_MOBILE
|
||||||
|
register_qml_types(NULL);
|
||||||
PluginManager::instance().loadPlugins();
|
PluginManager::instance().loadPlugins();
|
||||||
|
|
||||||
MainWindow *window = new MainWindow();
|
MainWindow *window = new MainWindow();
|
||||||
|
@ -59,8 +63,6 @@ double get_screen_dpi()
|
||||||
return mydesk->physicalDpiX();
|
return mydesk->physicalDpiX();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward declaration
|
|
||||||
static void register_qml_types(QQmlEngine *);
|
|
||||||
|
|
||||||
void run_ui()
|
void run_ui()
|
||||||
{
|
{
|
||||||
|
@ -138,7 +140,6 @@ void run_ui()
|
||||||
qml_window->show();
|
qml_window->show();
|
||||||
LOG_STP("run_ui running exec");
|
LOG_STP("run_ui running exec");
|
||||||
#else
|
#else
|
||||||
register_qml_types(NULL);
|
|
||||||
MainWindow::instance()->show();
|
MainWindow::instance()->show();
|
||||||
#endif // SUBSURFACE_MOBILE
|
#endif // SUBSURFACE_MOBILE
|
||||||
qApp->exec();
|
qApp->exec();
|
||||||
|
|
Loading…
Add table
Reference in a new issue