mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[calamares] avoid double-quit message
In Qt5, QApplication::quit() was sufficient. In Qt6, QApplication::quit() sends close events to top-level windows, so we get a duplicate prompt for quit. See https://blog.broulik.de/2023/11/on-the-road-to-plasma-6-vol-4/
This commit is contained in:
parent
f57ee158b7
commit
2555b5baf4
2 changed files with 14 additions and 2 deletions
|
@ -537,7 +537,11 @@ CalamaresWindow::closeEvent( QCloseEvent* event )
|
|||
if ( ( !m_viewManager ) || m_viewManager->confirmCancelInstallation() )
|
||||
{
|
||||
event->accept();
|
||||
qApp->quit();
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
QApplication::quit();
|
||||
#else
|
||||
QApplication::exit( EXIT_SUCCESS );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -172,7 +172,11 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
|||
{
|
||||
Calamares::Paste::doLogUploadUI( errorDialog );
|
||||
}
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
QApplication::quit();
|
||||
#else
|
||||
QApplication::exit( EXIT_SUCCESS );
|
||||
#endif
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -487,7 +491,11 @@ ViewManager::quit()
|
|||
{
|
||||
if ( confirmCancelInstallation() )
|
||||
{
|
||||
qApp->quit();
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
QApplication::quit();
|
||||
#else
|
||||
QApplication::exit( EXIT_SUCCESS );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue