mainwindow: create an instance of MapWidget for NO_MARBLE

This is an attempt for a smooth transition between Marble
and Qt Location map integration. If NO_MARBLE is defined
an instance of MapWidget (Qt Location) is created,
else an instance of the Marble widget would be used.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-15 01:09:23 +03:00 committed by Dirk Hohndel
parent 0f0a953727
commit b0b5f701fc

View file

@ -63,6 +63,8 @@
#include "plugins/facebook/facebookconnectwidget.h" #include "plugins/facebook/facebookconnectwidget.h"
#endif #endif
#include "desktop-widgets/mapwidget.h"
QProgressDialog *progressDialog = NULL; QProgressDialog *progressDialog = NULL;
bool progressDialogCanceled = false; bool progressDialogCanceled = false;
@ -106,7 +108,7 @@ MainWindow::MainWindow() : QMainWindow(),
#ifndef NO_MARBLE #ifndef NO_MARBLE
GlobeGPS *mapWidget = GlobeGPS::instance(); GlobeGPS *mapWidget = GlobeGPS::instance();
#else #else
QWidget *mapWidget = NULL; MapWidget *mapWidget = MapWidget::instance();
#endif #endif
PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget(); PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget();