[vlmc-devel] fixup! MainWindow: Restore settings after creating the entire UI

Hugo Beauzée-Luyssen git at videolan.org
Tue Jul 12 16:00:09 CEST 2016


vlmc | branch: medialibrary | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jul 12 15:49:06 2016 +0200| [07fb0f538af0d164ec8b9cd6bd15a8fcfe6cf77d] | committer: Hugo Beauzée-Luyssen

fixup! MainWindow: Restore settings after creating the entire UI

> https://code.videolan.org/videolan/vlmc/commit/07fb0f538af0d164ec8b9cd6bd15a8fcfe6cf77d
---

 src/Gui/MainWindow.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 75785df..a83db58 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -144,14 +144,15 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
     if ( restoreSession() == true )
         return ;
 #endif
+
+    //All preferences have been created: restore them:
+    Core::instance()->settings()->load();
+
     // Restore the geometry
     restoreGeometry( VLMC_GET_BYTEARRAY( "private/MainWindowGeometry" ) );
     // Restore the layout
-    restoreState( VLMC_GET_BYTEARRAY( "private/MainWindowState" ) );
+    Q_ASSERT( restoreState( VLMC_GET_BYTEARRAY( "private/MainWindowState" ) ) );
     retranslateUi();
-
-    //All preferences have been created: restore them:
-    Core::instance()->settings()->load();
 }
 
 MainWindow::~MainWindow()



More information about the Vlmc-devel mailing list