mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge branch 'branch-qt-5.15' of github.com:xiaoyifang/goldendict into branch-qt-5.15
This commit is contained in:
commit
3e4e7170e7
|
@ -1219,12 +1219,21 @@ void MainWindow::closeEvent( QCloseEvent * ev )
|
|||
{
|
||||
if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray )
|
||||
{
|
||||
ev->ignore();
|
||||
|
||||
if( !cfg.preferences.searchInDock )
|
||||
translateBox->setPopupEnabled( false );
|
||||
|
||||
#ifdef HAVE_X11
|
||||
// Don't ignore the close event, because doing so cancels session logout if
|
||||
// the main window is visible when the user attempts to log out.
|
||||
// The main window will be only hidden, because QApplication::quitOnLastWindowClosed
|
||||
// property is false and Qt::WA_DeleteOnClose widget attribute is not set.
|
||||
Q_ASSERT(!QApplication::quitOnLastWindowClosed());
|
||||
Q_ASSERT(!testAttribute(Qt::WA_DeleteOnClose));
|
||||
#else
|
||||
// Ignore the close event because closing the main window breaks global hotkeys on Windows.
|
||||
ev->ignore();
|
||||
hide();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue