mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
map-widget: fix chronology of QML class registration
The QML types needs to be registered before the MainWindow instance is created on the desktop version, otherwise the MapWidget instance will be created and it will fail with a missing QML namespace. In subsurface-helper.cpp, move register_qml_types() from run_ui() to init_ui(), as later in init_ui(), MainWindow is instantiated for the first time in the desktop version. Ref #1500 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
fe38a768f2
commit
f1ed8748b1
1 changed files with 1 additions and 1 deletions
|
@ -33,6 +33,7 @@ QObject *qqWindowObject = NULL;
|
|||
void init_ui()
|
||||
{
|
||||
init_qt_late();
|
||||
register_qml_types();
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
PluginManager::instance().loadPlugins();
|
||||
|
||||
|
@ -97,7 +98,6 @@ void register_qml_types()
|
|||
|
||||
void run_ui()
|
||||
{
|
||||
register_qml_types();
|
||||
|
||||
#ifdef SUBSURFACE_MOBILE
|
||||
QQmlApplicationEngine engine;
|
||||
|
|
Loading…
Reference in a new issue