rbutil: Modernize connect() calls.

Auto fixed by clazy.

Change-Id: Iea16d892fd81c151f0081f7476acc5eda62afc25
This commit is contained in:
Dominik Riebeling 2021-12-26 19:50:19 +01:00
parent 9f3d6e47e7
commit 1ad4faa334
9 changed files with 33 additions and 34 deletions

View file

@ -94,7 +94,7 @@ Config::Config(QWidget *parent,int index) : QDialog(parent)
this->setModal(true);
connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
connect(ui.buttonOk, &QAbstractButton::clicked, this, &Config::accept);
connect(ui.buttonCancel, &QAbstractButton::clicked, this, &Config::abort);
connect(ui.radioNoProxy, &QAbstractButton::toggled, this, &Config::setNoProxy);
connect(ui.radioSystemProxy, &QAbstractButton::toggled, this, &Config::setSystemProxy);

View file

@ -58,10 +58,10 @@ void CreateVoiceWindow::accept()
voicecreator->setWavtrimThreshold(ui.wavtrimthreshold->value());
//start creating
connect(voicecreator, SIGNAL(done(bool)), logger, SLOT(setFinished()));
connect(voicecreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(voicecreator, &VoiceFileCreator::done, logger, &ProgressLoggerGui::setFinished);
connect(voicecreator, &VoiceFileCreator::logItem, logger, &ProgressLoggerGui::addItem);
connect(voicecreator, &VoiceFileCreator::logProgress, logger, &ProgressLoggerGui::setProgress);
connect(logger,SIGNAL(aborted()),voicecreator,SLOT(abort()));
connect(logger,&ProgressLoggerGui::aborted,voicecreator,&VoiceFileCreator::abort);
voicecreator->createVoiceFile();
}

View file

@ -60,7 +60,6 @@ BackupDialog::BackupDialog(QWidget* parent) : QDialog(parent)
m_thread = new BackupSizeThread();
connect(m_thread, &QThread::finished, this, &BackupDialog::updateSizeInfo);
connect(m_thread, SIGNAL(terminated()), this, SLOT(updateSizeInfo()));
connect(ui.buttonCancel, &QAbstractButton::clicked, this, &QWidget::close);
connect(ui.buttonCancel, &QAbstractButton::clicked, m_thread, &QThread::quit);
@ -135,8 +134,8 @@ void BackupDialog::backup(void)
// create backup
ZipUtil zip(this);
connect(&zip, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
connect(&zip, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(&zip, &ZipUtil::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(&zip, &ZipUtil::logItem, m_logger, &ProgressLoggerGui::addItem);
zip.open(m_backupName, QuaZip::mdCreate);
QString mp = m_mountpoint + "/.rockbox";

View file

@ -28,7 +28,7 @@ Changelog::Changelog(QWidget *parent) : QDialog(parent)
ui.browserChangelog->setHtml(parseChangelogFile(":/docs/changelog.txt"));
ui.browserChangelog->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
ui.checkBoxShowAlways->setChecked(RbSettings::value(RbSettings::ShowChangelog).toBool());
connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
connect(ui.buttonOk, &QAbstractButton::clicked, this, &Changelog::accept);
}

View file

@ -292,9 +292,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, &BootloaderInstallBase::done, m_logger, &ProgressLoggerGui::setFinished);
connect(bl, &BootloaderInstallBase::done, this, &SelectiveInstallWidget::continueInstall);
connect(bl, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(bl, &BootloaderInstallBase::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(bl, &BootloaderInstallBase::logProgress, m_logger, &ProgressLoggerGui::setProgress);
// pass Abort button click signal to current installer
connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted()));
@ -447,9 +447,9 @@ void SelectiveInstallWidget::installRockbox(void)
connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(m_zipinstaller, &ZipInstaller::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
connect(m_logger, &ProgressLoggerGui::aborted, m_zipinstaller, &ZipInstaller::abort);
m_zipinstaller->install();
}
@ -488,9 +488,9 @@ void SelectiveInstallWidget::installFonts(void)
m_zipinstaller->setCache(true);
connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(m_zipinstaller, &ZipInstaller::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
connect(m_logger, &ProgressLoggerGui::aborted, m_zipinstaller, &ZipInstaller::abort);
m_zipinstaller->install();
}
else {
@ -527,9 +527,9 @@ void SelectiveInstallWidget::installVoicefile(void)
m_zipinstaller->setCache(true);
connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(m_zipinstaller, &ZipInstaller::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
connect(m_logger, &ProgressLoggerGui::aborted, m_zipinstaller, &ZipInstaller::abort);
m_zipinstaller->install();
}
else {
@ -572,9 +572,9 @@ void SelectiveInstallWidget::installManual(void)
m_zipinstaller->setUnzip(mantype == "html");
connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(m_zipinstaller, &ZipInstaller::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
connect(m_logger, &ProgressLoggerGui::aborted, m_zipinstaller, &ZipInstaller::abort);
m_zipinstaller->install();
}
else {
@ -667,9 +667,9 @@ void SelectiveInstallWidget::installPluginData(void)
if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
m_zipinstaller->setCache(true);
connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
connect(m_zipinstaller, &ZipInstaller::logItem, m_logger, &ProgressLoggerGui::addItem);
connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress);
connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
connect(m_logger, &ProgressLoggerGui::aborted, m_zipinstaller, &ZipInstaller::abort);
m_zipinstaller->install();
}
else {

View file

@ -116,10 +116,10 @@ void InstallTalkWindow::accept()
talkcreator->setIgnoreFiles(ui.ignoreFiles->text().split(",", QString::SkipEmptyParts));
#endif
connect(talkcreator, SIGNAL(done(bool)), logger, SLOT(setFinished()));
connect(talkcreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(talkcreator, &TalkFileCreator::done, logger, &ProgressLoggerGui::setFinished);
connect(talkcreator, &TalkFileCreator::logItem, logger, &ProgressLoggerGui::addItem);
connect(talkcreator, &TalkFileCreator::logProgress, logger, &ProgressLoggerGui::setProgress);
connect(logger,SIGNAL(aborted()),talkcreator,SLOT(abort()));
connect(logger,&ProgressLoggerGui::aborted,talkcreator,&TalkFileCreator::abort);
for(int i = 0; i < foldersToTalk.size(); i++) {
LOG_INFO() << "creating talk files for folder"

View file

@ -497,9 +497,9 @@ void RbUtilQt::uninstallBootloader(void)
return;
}
connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(bl, &BootloaderInstallBase::logItem, logger, &ProgressLoggerGui::addItem);
connect(bl, &BootloaderInstallBase::logProgress, logger, &ProgressLoggerGui::setProgress);
connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished()));
connect(bl, &BootloaderInstallBase::done, logger, &ProgressLoggerGui::setFinished);
// pass Abort button click signal to current installer
connect(logger, SIGNAL(aborted()), bl, SLOT(progressAborted()));

View file

@ -95,7 +95,7 @@ void ThemesInstallWindow::downloadInfo()
getter->setFile(&themesInfo);
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
connect(logger, SIGNAL(aborted()), getter, SLOT(abort()));
connect(logger, &ProgressLoggerGui::aborted, getter, &HttpGet::abort);
getter->getFile(url);
}
@ -111,8 +111,8 @@ void ThemesInstallWindow::downloadDone(bool error)
{
LOG_INFO() << "Download done, error:" << error;
disconnect(logger, SIGNAL(aborted()), getter, SLOT(abort()));
disconnect(logger, SIGNAL(aborted()), this, SLOT(close()));
disconnect(logger, &ProgressLoggerGui::aborted, getter, &HttpGet::abort);
disconnect(logger, &ProgressLoggerGui::aborted, this, &QWidget::close);
themesInfo.open();
QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this);
@ -299,7 +299,7 @@ void ThemesInstallWindow::show()
logger->show();
logger->addItem(tr("getting themes information ..."), LOGINFO);
connect(logger, SIGNAL(aborted()), this, SLOT(close()));
connect(logger, &ProgressLoggerGui::aborted, this, &QWidget::close);
downloadInfo();
}
@ -372,12 +372,12 @@ void ThemesInstallWindow::install()
if(!windowSelectOnly) {
connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close);
connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished()));
connect(installer, &ZipInstaller::done, logger, &ProgressLoggerGui::setFinished);
}
connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(installer, &ZipInstaller::logItem, logger, &ProgressLoggerGui::addItem);
connect(installer, &ZipInstaller::logProgress, logger, &ProgressLoggerGui::setProgress);
connect(installer, SIGNAL(done(bool)), this, SIGNAL(done(bool)));
connect(logger, SIGNAL(aborted()), installer, SLOT(abort()));
connect(logger, &ProgressLoggerGui::aborted, installer, &ZipInstaller::abort);
installer->install();
}

View file

@ -31,9 +31,9 @@ UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent)
uninstaller = new Uninstaller(this,mountpoint);
logger = new ProgressLoggerGui(this);
connect(uninstaller, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(uninstaller, &Uninstaller::logItem, logger, &ProgressLoggerGui::addItem);
connect(uninstaller, &Uninstaller::logProgress, logger, &ProgressLoggerGui::setProgress);
connect(uninstaller, SIGNAL(logFinished(void)), logger, SLOT(setFinished(void)));
connect(uninstaller, &Uninstaller::logFinished, logger, &ProgressLoggerGui::setFinished);
connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close);
// disable smart uninstall, if not possible