From 6ff75b475c2014271ac325aaf9cdae0d2909c0e6 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 25 Dec 2021 17:29:55 +0100 Subject: rbutil: Modernize connect() calls. Auto fixed by clazy. Change-Id: Ib7cce8c0a85f8f915263980bf5d2508a4b19bbe3 --- utils/rbutilqt/gui/backupdialog.cpp | 12 ++++++------ utils/rbutilqt/gui/selectiveinstallwidget.cpp | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'utils/rbutilqt/gui') diff --git a/utils/rbutilqt/gui/backupdialog.cpp b/utils/rbutilqt/gui/backupdialog.cpp index f12c47b570..63e628f7cf 100644 --- a/utils/rbutilqt/gui/backupdialog.cpp +++ b/utils/rbutilqt/gui/backupdialog.cpp @@ -59,13 +59,13 @@ BackupDialog::BackupDialog(QWidget* parent) : QDialog(parent) ui.setupUi(this); m_thread = new BackupSizeThread(); - connect(m_thread, SIGNAL(finished()), this, SLOT(updateSizeInfo())); + connect(m_thread, &QThread::finished, this, &BackupDialog::updateSizeInfo); connect(m_thread, SIGNAL(terminated()), this, SLOT(updateSizeInfo())); - connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(close())); - connect(ui.buttonCancel, SIGNAL(clicked()), m_thread, SLOT(quit())); - connect(ui.buttonChange, SIGNAL(clicked()), this, SLOT(changeBackupPath())); - connect(ui.buttonBackup, SIGNAL(clicked()), this, SLOT(backup())); + connect(ui.buttonCancel, &QAbstractButton::clicked, this, &QWidget::close); + connect(ui.buttonCancel, &QAbstractButton::clicked, m_thread, &QThread::quit); + connect(ui.buttonChange, &QAbstractButton::clicked, this, &BackupDialog::changeBackupPath); + connect(ui.buttonBackup, &QAbstractButton::clicked, this, &BackupDialog::backup); ui.backupSize->setText(tr("Installation size: calculating ...")); m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); @@ -120,7 +120,7 @@ void BackupDialog::backup(void) } } m_logger = new ProgressLoggerGui(this); - connect(m_logger, SIGNAL(closed()), this, SLOT(close())); + connect(m_logger, &ProgressLoggerGui::closed, this, &QWidget::close); m_logger->show(); m_logger->addItem(tr("Starting backup ..."),LOGINFO); QCoreApplication::processEvents(); diff --git a/utils/rbutilqt/gui/selectiveinstallwidget.cpp b/utils/rbutilqt/gui/selectiveinstallwidget.cpp index a0504c0f40..3fe2dc7956 100644 --- a/utils/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/utils/rbutilqt/gui/selectiveinstallwidget.cpp @@ -294,9 +294,9 @@ void SelectiveInstallWidget::installBootloader(void) // the bootloader install class does NOT use any GUI stuff. // All messages are passed via signals. connect(bl, SIGNAL(done(bool)), m_logger, SLOT(setFinished())); - connect(bl, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(bl, &BootloaderInstallBase::done, this, &SelectiveInstallWidget::continueInstall); connect(bl, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(bl, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(bl, &BootloaderInstallBase::logProgress, m_logger, &ProgressLoggerGui::setProgress); // pass Abort button click signal to current installer connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); @@ -446,10 +446,10 @@ void SelectiveInstallWidget::installRockbox(void) PlayerBuildInfo::BuildVersion, m_buildtype).toString()); m_zipinstaller->setMountPoint(m_mountpoint); - connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); m_zipinstaller->install(); @@ -488,9 +488,9 @@ void SelectiveInstallWidget::installFonts(void) if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) m_zipinstaller->setCache(true); - connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); m_zipinstaller->install(); } @@ -528,9 +528,9 @@ void SelectiveInstallWidget::installVoicefile(void) if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) m_zipinstaller->setCache(true); - connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); m_zipinstaller->install(); } @@ -574,9 +574,9 @@ void SelectiveInstallWidget::installManual(void) // if type is html extract it. m_zipinstaller->setUnzip(mantype == "html"); - connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); m_zipinstaller->install(); } @@ -669,9 +669,9 @@ void SelectiveInstallWidget::installPluginData(void) m_zipinstaller->setMountPoint(m_mountpoint); if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) m_zipinstaller->setCache(true); - connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); m_zipinstaller->install(); } -- cgit v1.2.3