mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Mac-specific: Fix save/restore main window configuration with Qt 5.12
This commit is contained in:
parent
db6c9a16e1
commit
df92b38ea8
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue