mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-23 10:25:45 -05:00
[finished] Handle Qt 6.7 deprecations in checkbox
This commit is contained in:
parent
a87487020a
commit
a067e4fc4f
1 changed files with 6 additions and 0 deletions
|
@ -41,9 +41,15 @@ FinishedPage::FinishedPage( Config* config, QWidget* parent )
|
|||
ui->restartCheckBox->setEnabled( mode != Mode::Always );
|
||||
} );
|
||||
connect( config, &Config::restartNowWantedChanged, ui->restartCheckBox, &QCheckBox::setChecked );
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||
connect( ui->restartCheckBox,
|
||||
&QCheckBox::stateChanged,
|
||||
[ config ]( int state ) { config->setRestartNowWanted( state != 0 ); } );
|
||||
#else
|
||||
connect( ui->restartCheckBox,
|
||||
&QCheckBox::checkStateChanged,
|
||||
[ config ]( Qt::CheckState state ) { config->setRestartNowWanted( state != Qt::Unchecked ); } );
|
||||
#endif
|
||||
|
||||
CALAMARES_RETRANSLATE_SLOT( &FinishedPage::retranslate );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue