mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +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
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
{
|
{
|
||||||
if ( cfg.mainWindowGeometry.size() )
|
if ( cfg.mainWindowGeometry.size() )
|
||||||
restoreGeometry( cfg.mainWindowGeometry );
|
restoreGeometry( cfg.mainWindowGeometry );
|
||||||
if ( cfg.mainWindowState.size() )
|
if ( cfg.mainWindowState.size() )
|
||||||
restoreState( cfg.mainWindowState, 1 );
|
restoreState( cfg.mainWindowState, 1 );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
updateSearchPaneAndBar( cfg.preferences.searchInDock );
|
updateSearchPaneAndBar( cfg.preferences.searchInDock );
|
||||||
ui.searchPane->setVisible( cfg.preferences.searchInDock );
|
ui.searchPane->setVisible( cfg.preferences.searchInDock );
|
||||||
|
|
||||||
|
@ -769,6 +770,15 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
|
|
||||||
setWindowTitle( "GoldenDict" );
|
setWindowTitle( "GoldenDict" );
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
{
|
||||||
|
if ( cfg.mainWindowGeometry.size() )
|
||||||
|
restoreGeometry( cfg.mainWindowGeometry );
|
||||||
|
if ( cfg.mainWindowState.size() )
|
||||||
|
restoreState( cfg.mainWindowState, 1 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
blockUpdateWindowTitle = true;
|
blockUpdateWindowTitle = true;
|
||||||
addNewTab();
|
addNewTab();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue