Commit d65d0f3c authored by Don Gagne's avatar Don Gagne

No widgets in mobile builds

parent 837de8bb
...@@ -823,6 +823,8 @@ void MainWindow::_storeCurrentViewState(void) ...@@ -823,6 +823,8 @@ void MainWindow::_storeCurrentViewState(void)
{ {
// HIL dock widgets are dynamic and are not part of the saved state // HIL dock widgets are dynamic and are not part of the saved state
_hideAllHilDockWidgets(); _hideAllHilDockWidgets();
#ifndef __mobile__
// Save list of visible widgets // Save list of visible widgets
bool firstWidget = true; bool firstWidget = true;
QString widgetNames = ""; QString widgetNames = "";
...@@ -836,6 +838,7 @@ void MainWindow::_storeCurrentViewState(void) ...@@ -836,6 +838,7 @@ void MainWindow::_storeCurrentViewState(void)
} }
} }
settings.setValue(_getWindowStateKey() + "WIDGETS", widgetNames); settings.setValue(_getWindowStateKey() + "WIDGETS", widgetNames);
#endif
settings.setValue(_getWindowStateKey(), saveState()); settings.setValue(_getWindowStateKey(), saveState());
settings.setValue(_getWindowGeometryKey(), saveGeometry()); settings.setValue(_getWindowGeometryKey(), saveGeometry());
} }
...@@ -906,6 +909,7 @@ void MainWindow::_loadCurrentViewState(void) ...@@ -906,6 +909,7 @@ void MainWindow::_loadCurrentViewState(void)
// Hide all widgets from previous view // Hide all widgets from previous view
_hideAllDockWidgets(); _hideAllDockWidgets();
#ifndef __mobile__
// Restore the widgets for the new view // Restore the widgets for the new view
QString widgetNames = settings.value(_getWindowStateKey() + "WIDGETS", defaultWidgets).toString(); QString widgetNames = settings.value(_getWindowStateKey() + "WIDGETS", defaultWidgets).toString();
qDebug() << widgetNames; qDebug() << widgetNames;
...@@ -916,6 +920,7 @@ void MainWindow::_loadCurrentViewState(void) ...@@ -916,6 +920,7 @@ void MainWindow::_loadCurrentViewState(void)
_showDockWidget(widgetName, true); _showDockWidget(widgetName, true);
} }
} }
#endif
if (settings.contains(_getWindowStateKey())) { if (settings.contains(_getWindowStateKey())) {
restoreState(settings.value(_getWindowStateKey()).toByteArray()); restoreState(settings.value(_getWindowStateKey()).toByteArray());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment