Mac-specific: Fix save/restore main window configuration with Qt 5.12

This commit is contained in:
Abs62 2019-09-30 19:36:59 +03:00
parent db6c9a16e1
commit df92b38ea8

View file

@ -743,13 +743,14 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
}
else
#endif
#ifndef Q_OS_MAC
{
if ( cfg.mainWindowGeometry.size() )
restoreGeometry( cfg.mainWindowGeometry );
if ( cfg.mainWindowState.size() )
restoreState( cfg.mainWindowState, 1 );
}
#endif
updateSearchPaneAndBar( cfg.preferences.searchInDock );
ui.searchPane->setVisible( cfg.preferences.searchInDock );
@ -769,6 +770,15 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
setWindowTitle( "GoldenDict" );
#ifdef Q_OS_MAC
{
if ( cfg.mainWindowGeometry.size() )
restoreGeometry( cfg.mainWindowGeometry );
if ( cfg.mainWindowState.size() )
restoreState( cfg.mainWindowState, 1 );
}
#endif
blockUpdateWindowTitle = true;
addNewTab();