diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-25 17:29:55 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-25 17:47:14 +0100 |
commit | 6ff75b475c2014271ac325aaf9cdae0d2909c0e6 (patch) | |
tree | baf72ed29ca7fe6ba1d0042a773f6d3b9e173325 | |
parent | dce2ccdd967820ad795927bb837ae34cf20929b8 (diff) | |
download | rockbox-6ff75b475c2014271ac325aaf9cdae0d2909c0e6.tar.gz rockbox-6ff75b475c2014271ac325aaf9cdae0d2909c0e6.zip |
rbutil: Modernize connect() calls.
Auto fixed by clazy.
Change-Id: Ib7cce8c0a85f8f915263980bf5d2508a4b19bbe3
-rw-r--r-- | utils/rbutilqt/base/bootloaderinstallimx.cpp | 1 | ||||
-rw-r--r-- | utils/rbutilqt/configure.cpp | 30 | ||||
-rw-r--r-- | utils/rbutilqt/createvoicewindow.cpp | 8 | ||||
-rw-r--r-- | utils/rbutilqt/encttscfggui.cpp | 12 | ||||
-rw-r--r-- | utils/rbutilqt/gui/backupdialog.cpp | 12 | ||||
-rw-r--r-- | utils/rbutilqt/gui/selectiveinstallwidget.cpp | 24 | ||||
-rw-r--r-- | utils/rbutilqt/installtalkwindow.cpp | 8 | ||||
-rw-r--r-- | utils/rbutilqt/preview.cpp | 2 | ||||
-rw-r--r-- | utils/rbutilqt/progressloggergui.cpp | 10 | ||||
-rw-r--r-- | utils/rbutilqt/rbutilqt.cpp | 56 | ||||
-rw-r--r-- | utils/rbutilqt/test/test-httpget.cpp | 30 | ||||
-rw-r--r-- | utils/rbutilqt/themesinstallwindow.cpp | 18 | ||||
-rw-r--r-- | utils/rbutilqt/uninstallwindow.cpp | 8 |
13 files changed, 109 insertions, 110 deletions
diff --git a/utils/rbutilqt/base/bootloaderinstallimx.cpp b/utils/rbutilqt/base/bootloaderinstallimx.cpp index 7428cf10c8..87f5d9de63 100644 --- a/utils/rbutilqt/base/bootloaderinstallimx.cpp +++ b/utils/rbutilqt/base/bootloaderinstallimx.cpp | |||
@@ -121,7 +121,6 @@ void BootloaderInstallImx::installStage2(void) | |||
121 | m_tempfile.close(); | 121 | m_tempfile.close(); |
122 | m_patchedFile.close(); | 122 | m_patchedFile.close(); |
123 | connect(m_thread, &QThread::finished, this, &BootloaderInstallImx::installStage3); | 123 | connect(m_thread, &QThread::finished, this, &BootloaderInstallImx::installStage3); |
124 | connect(m_thread, SIGNAL(terminated()), this, SLOT(installStage3())); | ||
125 | m_thread->start(); | 124 | m_thread->start(); |
126 | } | 125 | } |
127 | 126 | ||
diff --git a/utils/rbutilqt/configure.cpp b/utils/rbutilqt/configure.cpp index 892b327419..6f64a007a9 100644 --- a/utils/rbutilqt/configure.cpp +++ b/utils/rbutilqt/configure.cpp | |||
@@ -95,24 +95,24 @@ Config::Config(QWidget *parent,int index) : QDialog(parent) | |||
95 | this->setModal(true); | 95 | this->setModal(true); |
96 | 96 | ||
97 | connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); | 97 | connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); |
98 | connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(abort())); | 98 | connect(ui.buttonCancel, &QAbstractButton::clicked, this, &Config::abort); |
99 | connect(ui.radioNoProxy, SIGNAL(toggled(bool)), this, SLOT(setNoProxy(bool))); | 99 | connect(ui.radioNoProxy, &QAbstractButton::toggled, this, &Config::setNoProxy); |
100 | connect(ui.radioSystemProxy, SIGNAL(toggled(bool)), this, SLOT(setSystemProxy(bool))); | 100 | connect(ui.radioSystemProxy, &QAbstractButton::toggled, this, &Config::setSystemProxy); |
101 | connect(ui.refreshMountPoint, SIGNAL(clicked()), this, SLOT(refreshMountpoint())); | 101 | connect(ui.refreshMountPoint, &QAbstractButton::clicked, this, &Config::refreshMountpoint); |
102 | connect(ui.buttonAutodetect,SIGNAL(clicked()),this,SLOT(autodetect())); | 102 | connect(ui.buttonAutodetect, &QAbstractButton::clicked, this, &Config::autodetect); |
103 | connect(ui.buttonCacheBrowse, SIGNAL(clicked()), this, SLOT(browseCache())); | 103 | connect(ui.buttonCacheBrowse, &QAbstractButton::clicked, this, &Config::browseCache); |
104 | connect(ui.buttonCacheClear, SIGNAL(clicked()), this, SLOT(cacheClear())); | 104 | connect(ui.buttonCacheClear, &QAbstractButton::clicked, this, &Config::cacheClear); |
105 | connect(ui.configTts, SIGNAL(clicked()), this, SLOT(configTts())); | 105 | connect(ui.configTts, &QAbstractButton::clicked, this, &Config::configTts); |
106 | connect(ui.configEncoder, SIGNAL(clicked()), this, SLOT(configEnc())); | 106 | connect(ui.configEncoder, &QAbstractButton::clicked, this, &Config::configEnc); |
107 | connect(ui.comboTts, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTtsState(int))); | 107 | connect(ui.comboTts, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTtsState(int))); |
108 | connect(ui.treeDevices, SIGNAL(itemSelectionChanged()), this, SLOT(updateEncState())); | 108 | connect(ui.treeDevices, &QTreeWidget::itemSelectionChanged, this, &Config::updateEncState); |
109 | connect(ui.testTTS,SIGNAL(clicked()),this,SLOT(testTts())); | 109 | connect(ui.testTTS, &QAbstractButton::clicked, this, &Config::testTts); |
110 | connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool))); | 110 | connect(ui.showDisabled, &QAbstractButton::toggled, this, &Config::showDisabled); |
111 | connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString))); | 111 | connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString))); |
112 | connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int))); | 112 | connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int))); |
113 | connect(ui.checkShowProxyPassword, SIGNAL(toggled(bool)), this, SLOT(showProxyPassword(bool))); | 113 | connect(ui.checkShowProxyPassword, &QAbstractButton::toggled, this, &Config::showProxyPassword); |
114 | // delete this dialog after it finished automatically. | 114 | // delete this dialog after it finished automatically. |
115 | connect(this, SIGNAL(finished(int)), this, SLOT(deleteLater())); | 115 | connect(this, &QDialog::finished, this, &QObject::deleteLater); |
116 | 116 | ||
117 | setUserSettings(); | 117 | setUserSettings(); |
118 | setDevices(); | 118 | setDevices(); |
@@ -285,7 +285,7 @@ void Config::setUserSettings() | |||
285 | ui.listLanguages->setCurrentItem(a.at(0)); | 285 | ui.listLanguages->setCurrentItem(a.at(0)); |
286 | // don't connect before language list has been set up to prevent | 286 | // don't connect before language list has been set up to prevent |
287 | // triggering the signal by selecting the saved language. | 287 | // triggering the signal by selecting the saved language. |
288 | connect(ui.listLanguages, SIGNAL(itemSelectionChanged()), this, SLOT(updateLanguage())); | 288 | connect(ui.listLanguages, &QListWidget::itemSelectionChanged, this, &Config::updateLanguage); |
289 | 289 | ||
290 | // devices tab | 290 | // devices tab |
291 | refreshMountpoint(); | 291 | refreshMountpoint(); |
diff --git a/utils/rbutilqt/createvoicewindow.cpp b/utils/rbutilqt/createvoicewindow.cpp index 158c1201ce..36131cb537 100644 --- a/utils/rbutilqt/createvoicewindow.cpp +++ b/utils/rbutilqt/createvoicewindow.cpp | |||
@@ -30,7 +30,7 @@ CreateVoiceWindow::CreateVoiceWindow(QWidget *parent) : QDialog(parent) | |||
30 | ui.setupUi(this); | 30 | ui.setupUi(this); |
31 | voicecreator = new VoiceFileCreator(this); | 31 | voicecreator = new VoiceFileCreator(this); |
32 | updateSettings(); | 32 | updateSettings(); |
33 | connect(ui.change,SIGNAL(clicked()),this,SLOT(change())); | 33 | connect(ui.change,&QAbstractButton::clicked,this,&CreateVoiceWindow::change); |
34 | } | 34 | } |
35 | 35 | ||
36 | void CreateVoiceWindow::change() | 36 | void CreateVoiceWindow::change() |
@@ -40,14 +40,14 @@ void CreateVoiceWindow::change() | |||
40 | 40 | ||
41 | // call configuration dialog | 41 | // call configuration dialog |
42 | Config *cw = new Config(this,4); | 42 | Config *cw = new Config(this,4); |
43 | connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); | 43 | connect(cw, &Config::settingsUpdated, this, &CreateVoiceWindow::updateSettings); |
44 | cw->show(); | 44 | cw->show(); |
45 | } | 45 | } |
46 | 46 | ||
47 | void CreateVoiceWindow::accept() | 47 | void CreateVoiceWindow::accept() |
48 | { | 48 | { |
49 | logger = new ProgressLoggerGui(this); | 49 | logger = new ProgressLoggerGui(this); |
50 | connect(logger,SIGNAL(closed()),this,SLOT(close())); | 50 | connect(logger,&ProgressLoggerGui::closed,this,&QWidget::close); |
51 | logger->show(); | 51 | logger->show(); |
52 | 52 | ||
53 | saveSettings(); | 53 | saveSettings(); |
@@ -60,7 +60,7 @@ void CreateVoiceWindow::accept() | |||
60 | //start creating | 60 | //start creating |
61 | connect(voicecreator, SIGNAL(done(bool)), logger, SLOT(setFinished())); | 61 | connect(voicecreator, SIGNAL(done(bool)), logger, SLOT(setFinished())); |
62 | connect(voicecreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 62 | connect(voicecreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
63 | connect(voicecreator, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 63 | connect(voicecreator, &VoiceFileCreator::logProgress, logger, &ProgressLoggerGui::setProgress); |
64 | connect(logger,SIGNAL(aborted()),voicecreator,SLOT(abort())); | 64 | connect(logger,SIGNAL(aborted()),voicecreator,SLOT(abort())); |
65 | voicecreator->createVoiceFile(); | 65 | voicecreator->createVoiceFile(); |
66 | } | 66 | } |
diff --git a/utils/rbutilqt/encttscfggui.cpp b/utils/rbutilqt/encttscfggui.cpp index 19181c0f8b..51a047da61 100644 --- a/utils/rbutilqt/encttscfggui.cpp +++ b/utils/rbutilqt/encttscfggui.cpp | |||
@@ -47,8 +47,8 @@ EncTtsCfgGui::EncTtsCfgGui(QDialog* parent, EncTtsSettingInterface* iface, QStri | |||
47 | m_busyDlg->setLabel(nullptr); | 47 | m_busyDlg->setLabel(nullptr); |
48 | m_busyDlg->setCancelButton(nullptr); | 48 | m_busyDlg->setCancelButton(nullptr); |
49 | m_busyDlg->hide(); | 49 | m_busyDlg->hide(); |
50 | connect(iface,SIGNAL(busy()),this,SLOT(showBusy())); | 50 | connect(iface,&EncTtsSettingInterface::busy,this,&EncTtsCfgGui::showBusy); |
51 | connect(iface,SIGNAL(busyEnd()),this,SLOT(hideBusy())); | 51 | connect(iface,&EncTtsSettingInterface::busyEnd,this,&EncTtsCfgGui::hideBusy); |
52 | 52 | ||
53 | //setup the window | 53 | //setup the window |
54 | setWindowTitle(name); | 54 | setWindowTitle(name); |
@@ -144,7 +144,7 @@ QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting) | |||
144 | QLineEdit *lineEdit = new QLineEdit(this); | 144 | QLineEdit *lineEdit = new QLineEdit(this); |
145 | lineEdit->setAccessibleName(setting->name()); | 145 | lineEdit->setAccessibleName(setting->name()); |
146 | lineEdit->setText(setting->current().toString()); | 146 | lineEdit->setText(setting->current().toString()); |
147 | connect(lineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateSetting())); | 147 | connect(lineEdit,&QLineEdit::textChanged,this,&EncTtsCfgGui::updateSetting); |
148 | value = lineEdit; | 148 | value = lineEdit; |
149 | break; | 149 | break; |
150 | } | 150 | } |
@@ -169,7 +169,7 @@ QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting) | |||
169 | QCheckBox *checkbox = new QCheckBox(this); | 169 | QCheckBox *checkbox = new QCheckBox(this); |
170 | checkbox->setAccessibleName(setting->name()); | 170 | checkbox->setAccessibleName(setting->name()); |
171 | checkbox->setCheckState(setting->current().toBool() == true ? Qt::Checked : Qt::Unchecked); | 171 | checkbox->setCheckState(setting->current().toBool() == true ? Qt::Checked : Qt::Unchecked); |
172 | connect(checkbox,SIGNAL(stateChanged(int)),this,SLOT(updateSetting())); | 172 | connect(checkbox,&QCheckBox::stateChanged,this,&EncTtsCfgGui::updateSetting); |
173 | value = checkbox; | 173 | value = checkbox; |
174 | break; | 174 | break; |
175 | } | 175 | } |
@@ -184,7 +184,7 @@ QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting) | |||
184 | if(value != nullptr) | 184 | if(value != nullptr) |
185 | { | 185 | { |
186 | m_settingsWidgetsMap.insert(setting,value); | 186 | m_settingsWidgetsMap.insert(setting,value); |
187 | connect(setting,SIGNAL(updateGui()),this,SLOT(updateWidget())); | 187 | connect(setting,&EncTtsSetting::updateGui,this,&EncTtsCfgGui::updateWidget); |
188 | } | 188 | } |
189 | 189 | ||
190 | return value; | 190 | return value; |
@@ -204,7 +204,7 @@ QWidget* EncTtsCfgGui::createButton(EncTtsSetting* setting) | |||
204 | { | 204 | { |
205 | QPushButton* refreshbtn = new QPushButton(tr("Refresh"),this); | 205 | QPushButton* refreshbtn = new QPushButton(tr("Refresh"),this); |
206 | refreshbtn->setIcon(QIcon(":/icons/view-refresh.svg")); | 206 | refreshbtn->setIcon(QIcon(":/icons/view-refresh.svg")); |
207 | connect(refreshbtn,SIGNAL(clicked()),setting,SIGNAL(refresh())); | 207 | connect(refreshbtn,&QAbstractButton::clicked,setting,&EncTtsSetting::refresh); |
208 | return refreshbtn; | 208 | return refreshbtn; |
209 | } | 209 | } |
210 | else | 210 | else |
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) | |||
59 | ui.setupUi(this); | 59 | ui.setupUi(this); |
60 | 60 | ||
61 | m_thread = new BackupSizeThread(); | 61 | m_thread = new BackupSizeThread(); |
62 | connect(m_thread, SIGNAL(finished()), this, SLOT(updateSizeInfo())); | 62 | connect(m_thread, &QThread::finished, this, &BackupDialog::updateSizeInfo); |
63 | connect(m_thread, SIGNAL(terminated()), this, SLOT(updateSizeInfo())); | 63 | connect(m_thread, SIGNAL(terminated()), this, SLOT(updateSizeInfo())); |
64 | 64 | ||
65 | connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(close())); | 65 | connect(ui.buttonCancel, &QAbstractButton::clicked, this, &QWidget::close); |
66 | connect(ui.buttonCancel, SIGNAL(clicked()), m_thread, SLOT(quit())); | 66 | connect(ui.buttonCancel, &QAbstractButton::clicked, m_thread, &QThread::quit); |
67 | connect(ui.buttonChange, SIGNAL(clicked()), this, SLOT(changeBackupPath())); | 67 | connect(ui.buttonChange, &QAbstractButton::clicked, this, &BackupDialog::changeBackupPath); |
68 | connect(ui.buttonBackup, SIGNAL(clicked()), this, SLOT(backup())); | 68 | connect(ui.buttonBackup, &QAbstractButton::clicked, this, &BackupDialog::backup); |
69 | 69 | ||
70 | ui.backupSize->setText(tr("Installation size: calculating ...")); | 70 | ui.backupSize->setText(tr("Installation size: calculating ...")); |
71 | m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); | 71 | m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); |
@@ -120,7 +120,7 @@ void BackupDialog::backup(void) | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | m_logger = new ProgressLoggerGui(this); | 122 | m_logger = new ProgressLoggerGui(this); |
123 | connect(m_logger, SIGNAL(closed()), this, SLOT(close())); | 123 | connect(m_logger, &ProgressLoggerGui::closed, this, &QWidget::close); |
124 | m_logger->show(); | 124 | m_logger->show(); |
125 | m_logger->addItem(tr("Starting backup ..."),LOGINFO); | 125 | m_logger->addItem(tr("Starting backup ..."),LOGINFO); |
126 | QCoreApplication::processEvents(); | 126 | 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) | |||
294 | // the bootloader install class does NOT use any GUI stuff. | 294 | // the bootloader install class does NOT use any GUI stuff. |
295 | // All messages are passed via signals. | 295 | // All messages are passed via signals. |
296 | connect(bl, SIGNAL(done(bool)), m_logger, SLOT(setFinished())); | 296 | connect(bl, SIGNAL(done(bool)), m_logger, SLOT(setFinished())); |
297 | connect(bl, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 297 | connect(bl, &BootloaderInstallBase::done, this, &SelectiveInstallWidget::continueInstall); |
298 | connect(bl, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 298 | connect(bl, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
299 | connect(bl, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 299 | connect(bl, &BootloaderInstallBase::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
300 | // pass Abort button click signal to current installer | 300 | // pass Abort button click signal to current installer |
301 | connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); | 301 | connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); |
302 | 302 | ||
@@ -446,10 +446,10 @@ void SelectiveInstallWidget::installRockbox(void) | |||
446 | PlayerBuildInfo::BuildVersion, m_buildtype).toString()); | 446 | PlayerBuildInfo::BuildVersion, m_buildtype).toString()); |
447 | m_zipinstaller->setMountPoint(m_mountpoint); | 447 | m_zipinstaller->setMountPoint(m_mountpoint); |
448 | 448 | ||
449 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 449 | connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); |
450 | 450 | ||
451 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 451 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
452 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 452 | connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
453 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 453 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
454 | m_zipinstaller->install(); | 454 | m_zipinstaller->install(); |
455 | 455 | ||
@@ -488,9 +488,9 @@ void SelectiveInstallWidget::installFonts(void) | |||
488 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) | 488 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
489 | m_zipinstaller->setCache(true); | 489 | m_zipinstaller->setCache(true); |
490 | 490 | ||
491 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 491 | connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); |
492 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 492 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
493 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 493 | connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
494 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 494 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
495 | m_zipinstaller->install(); | 495 | m_zipinstaller->install(); |
496 | } | 496 | } |
@@ -528,9 +528,9 @@ void SelectiveInstallWidget::installVoicefile(void) | |||
528 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) | 528 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
529 | m_zipinstaller->setCache(true); | 529 | m_zipinstaller->setCache(true); |
530 | 530 | ||
531 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 531 | connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); |
532 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 532 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
533 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 533 | connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
534 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 534 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
535 | m_zipinstaller->install(); | 535 | m_zipinstaller->install(); |
536 | } | 536 | } |
@@ -574,9 +574,9 @@ void SelectiveInstallWidget::installManual(void) | |||
574 | // if type is html extract it. | 574 | // if type is html extract it. |
575 | m_zipinstaller->setUnzip(mantype == "html"); | 575 | m_zipinstaller->setUnzip(mantype == "html"); |
576 | 576 | ||
577 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 577 | connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); |
578 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 578 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
579 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 579 | connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
580 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 580 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
581 | m_zipinstaller->install(); | 581 | m_zipinstaller->install(); |
582 | } | 582 | } |
@@ -669,9 +669,9 @@ void SelectiveInstallWidget::installPluginData(void) | |||
669 | m_zipinstaller->setMountPoint(m_mountpoint); | 669 | m_zipinstaller->setMountPoint(m_mountpoint); |
670 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) | 670 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
671 | m_zipinstaller->setCache(true); | 671 | m_zipinstaller->setCache(true); |
672 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 672 | connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall); |
673 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 673 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
674 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 674 | connect(m_zipinstaller, &ZipInstaller::logProgress, m_logger, &ProgressLoggerGui::setProgress); |
675 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 675 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
676 | m_zipinstaller->install(); | 676 | m_zipinstaller->install(); |
677 | } | 677 | } |
diff --git a/utils/rbutilqt/installtalkwindow.cpp b/utils/rbutilqt/installtalkwindow.cpp index f735a36e95..bf374decb5 100644 --- a/utils/rbutilqt/installtalkwindow.cpp +++ b/utils/rbutilqt/installtalkwindow.cpp | |||
@@ -29,7 +29,7 @@ InstallTalkWindow::InstallTalkWindow(QWidget *parent) : QDialog(parent) | |||
29 | ui.setupUi(this); | 29 | ui.setupUi(this); |
30 | talkcreator = new TalkFileCreator(this); | 30 | talkcreator = new TalkFileCreator(this); |
31 | 31 | ||
32 | connect(ui.change,SIGNAL(clicked()),this,SLOT(change())); | 32 | connect(ui.change,&QAbstractButton::clicked,this,&InstallTalkWindow::change); |
33 | 33 | ||
34 | ui.recursive->setChecked(true); | 34 | ui.recursive->setChecked(true); |
35 | ui.GenerateOnlyNew->setChecked(true); | 35 | ui.GenerateOnlyNew->setChecked(true); |
@@ -81,7 +81,7 @@ void InstallTalkWindow::change() | |||
81 | 81 | ||
82 | // make sure the current selected folder doesn't get lost on settings | 82 | // make sure the current selected folder doesn't get lost on settings |
83 | // changes. | 83 | // changes. |
84 | connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); | 84 | connect(cw, &Config::settingsUpdated, this, &InstallTalkWindow::updateSettings); |
85 | 85 | ||
86 | cw->show(); | 86 | cw->show(); |
87 | } | 87 | } |
@@ -100,7 +100,7 @@ void InstallTalkWindow::accept() | |||
100 | 100 | ||
101 | logger = new ProgressLoggerGui(this); | 101 | logger = new ProgressLoggerGui(this); |
102 | 102 | ||
103 | connect(logger,SIGNAL(closed()),this,SLOT(close())); | 103 | connect(logger,&ProgressLoggerGui::closed,this,&QWidget::close); |
104 | logger->show(); | 104 | logger->show(); |
105 | 105 | ||
106 | talkcreator->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString()); | 106 | talkcreator->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString()); |
@@ -118,7 +118,7 @@ void InstallTalkWindow::accept() | |||
118 | 118 | ||
119 | connect(talkcreator, SIGNAL(done(bool)), logger, SLOT(setFinished())); | 119 | connect(talkcreator, SIGNAL(done(bool)), logger, SLOT(setFinished())); |
120 | connect(talkcreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 120 | connect(talkcreator, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
121 | connect(talkcreator, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 121 | connect(talkcreator, &TalkFileCreator::logProgress, logger, &ProgressLoggerGui::setProgress); |
122 | connect(logger,SIGNAL(aborted()),talkcreator,SLOT(abort())); | 122 | connect(logger,SIGNAL(aborted()),talkcreator,SLOT(abort())); |
123 | 123 | ||
124 | for(int i = 0; i < foldersToTalk.size(); i++) { | 124 | for(int i = 0; i < foldersToTalk.size(); i++) { |
diff --git a/utils/rbutilqt/preview.cpp b/utils/rbutilqt/preview.cpp index 5006a03a09..ba241dfe01 100644 --- a/utils/rbutilqt/preview.cpp +++ b/utils/rbutilqt/preview.cpp | |||
@@ -73,7 +73,7 @@ PreviewLabel::PreviewLabel(QWidget * parent, Qt::WindowFlags f) | |||
73 | 73 | ||
74 | hovertimer.setInterval(1500); // wait for 1.5 seconds before showing the Fullsize Preview | 74 | hovertimer.setInterval(1500); // wait for 1.5 seconds before showing the Fullsize Preview |
75 | hovertimer.setSingleShot(true); | 75 | hovertimer.setSingleShot(true); |
76 | connect(&hovertimer,SIGNAL(timeout ()),this,SLOT(timeout())); | 76 | connect(&hovertimer, &QTimer::timeout, this, &PreviewLabel::timeout); |
77 | } | 77 | } |
78 | 78 | ||
79 | void PreviewLabel::mouseMoveEvent(QMouseEvent * event) | 79 | void PreviewLabel::mouseMoveEvent(QMouseEvent * event) |
diff --git a/utils/rbutilqt/progressloggergui.cpp b/utils/rbutilqt/progressloggergui.cpp index 37e0908ae0..78fc00db8f 100644 --- a/utils/rbutilqt/progressloggergui.cpp +++ b/utils/rbutilqt/progressloggergui.cpp | |||
@@ -29,7 +29,7 @@ ProgressLoggerGui::ProgressLoggerGui(QWidget* parent): ProgressloggerInterface(p | |||
29 | dp.setupUi(downloadProgress); | 29 | dp.setupUi(downloadProgress); |
30 | dp.listProgress->setAlternatingRowColors(true); | 30 | dp.listProgress->setAlternatingRowColors(true); |
31 | dp.saveLog->hide(); | 31 | dp.saveLog->hide(); |
32 | connect(dp.saveLog,SIGNAL(clicked()),this,SLOT(saveErrorLog())); | 32 | connect(dp.saveLog,&QAbstractButton::clicked,this,&ProgressLoggerGui::saveErrorLog); |
33 | setRunning(); | 33 | setRunning(); |
34 | } | 34 | } |
35 | 35 | ||
@@ -100,9 +100,9 @@ void ProgressLoggerGui::setRunning() | |||
100 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/process-stop.svg"))); | 100 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/process-stop.svg"))); |
101 | 101 | ||
102 | // make sure to not close the window on button press. | 102 | // make sure to not close the window on button press. |
103 | disconnect(dp.buttonAbort, SIGNAL(clicked()), downloadProgress, SLOT(close())); | 103 | disconnect(dp.buttonAbort, &QAbstractButton::clicked, downloadProgress, &QWidget::close); |
104 | // emit aborted() once button is pressed but not closed(). | 104 | // emit aborted() once button is pressed but not closed(). |
105 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(closed())); | 105 | disconnect(dp.buttonAbort, &QAbstractButton::clicked, this, &ProgressLoggerGui::closed); |
106 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); | 106 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); |
107 | 107 | ||
108 | } | 108 | } |
@@ -118,10 +118,10 @@ void ProgressLoggerGui::setFinished() | |||
118 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/go-next.svg"))); | 118 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/go-next.svg"))); |
119 | 119 | ||
120 | // close the window on button press. | 120 | // close the window on button press. |
121 | connect(dp.buttonAbort, SIGNAL(clicked()), downloadProgress, SLOT(close())); | 121 | connect(dp.buttonAbort, &QAbstractButton::clicked, downloadProgress, &QWidget::close); |
122 | // emit closed() once button is pressed but not aborted(). | 122 | // emit closed() once button is pressed but not aborted(). |
123 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); | 123 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); |
124 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(closed())); | 124 | connect(dp.buttonAbort, &QAbstractButton::clicked, this, &ProgressLoggerGui::closed); |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
diff --git a/utils/rbutilqt/rbutilqt.cpp b/utils/rbutilqt/rbutilqt.cpp index 91704db4b2..b425ed4d70 100644 --- a/utils/rbutilqt/rbutilqt.cpp +++ b/utils/rbutilqt/rbutilqt.cpp | |||
@@ -127,7 +127,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
127 | ui.selective->setLayout(selectivetablayout); | 127 | ui.selective->setLayout(selectivetablayout); |
128 | selectiveinstallwidget = new SelectiveInstallWidget(this); | 128 | selectiveinstallwidget = new SelectiveInstallWidget(this); |
129 | selectivetablayout->addWidget(selectiveinstallwidget); | 129 | selectivetablayout->addWidget(selectiveinstallwidget); |
130 | connect(ui.buttonChangeDevice, SIGNAL(clicked()), selectiveinstallwidget, SLOT(saveSettings())); | 130 | connect(ui.buttonChangeDevice, &QAbstractButton::clicked, selectiveinstallwidget, &SelectiveInstallWidget::saveSettings); |
131 | 131 | ||
132 | // info tab | 132 | // info tab |
133 | QGridLayout *infotablayout = new QGridLayout(this); | 133 | QGridLayout *infotablayout = new QGridLayout(this); |
@@ -135,28 +135,28 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
135 | info = new InfoWidget(this); | 135 | info = new InfoWidget(this); |
136 | infotablayout->addWidget(info); | 136 | infotablayout->addWidget(info); |
137 | 137 | ||
138 | connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int))); | 138 | connect(ui.tabWidget, &QTabWidget::currentChanged, this, &RbUtilQt::updateTabs); |
139 | connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); | 139 | connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); |
140 | connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about())); | 140 | connect(ui.action_About, &QAction::triggered, this, &RbUtilQt::about); |
141 | connect(ui.action_Help, SIGNAL(triggered()), this, SLOT(help())); | 141 | connect(ui.action_Help, &QAction::triggered, this, &RbUtilQt::help); |
142 | connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog())); | 142 | connect(ui.action_Configure, &QAction::triggered, this, &RbUtilQt::configDialog); |
143 | connect(ui.actionE_xit, SIGNAL(triggered()), this, SLOT(shutdown())); | 143 | connect(ui.actionE_xit, &QAction::triggered, this, &RbUtilQt::shutdown); |
144 | connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog())); | 144 | connect(ui.buttonChangeDevice, &QAbstractButton::clicked, this, &RbUtilQt::configDialog); |
145 | connect(ui.buttonEject, SIGNAL(clicked()), this, SLOT(eject())); | 145 | connect(ui.buttonEject, &QAbstractButton::clicked, this, &RbUtilQt::eject); |
146 | connect(ui.buttonTalk, SIGNAL(clicked()), this, SLOT(createTalkFiles())); | 146 | connect(ui.buttonTalk, &QAbstractButton::clicked, this, &RbUtilQt::createTalkFiles); |
147 | connect(ui.buttonCreateVoice, SIGNAL(clicked()), this, SLOT(createVoiceFile())); | 147 | connect(ui.buttonCreateVoice, &QAbstractButton::clicked, this, &RbUtilQt::createVoiceFile); |
148 | connect(ui.buttonRemoveRockbox, SIGNAL(clicked()), this, SLOT(uninstall())); | 148 | connect(ui.buttonRemoveRockbox, &QAbstractButton::clicked, this, &RbUtilQt::uninstall); |
149 | connect(ui.buttonRemoveBootloader, SIGNAL(clicked()), this, SLOT(uninstallBootloader())); | 149 | connect(ui.buttonRemoveBootloader, &QAbstractButton::clicked, this, &RbUtilQt::uninstallBootloader); |
150 | connect(ui.buttonBackup, SIGNAL(clicked()), this, SLOT(backup())); | 150 | connect(ui.buttonBackup, &QAbstractButton::clicked, this, &RbUtilQt::backup); |
151 | 151 | ||
152 | // actions accessible from the menu | 152 | // actions accessible from the menu |
153 | connect(ui.actionCreate_Voice_File, SIGNAL(triggered()), this, SLOT(createVoiceFile())); | 153 | connect(ui.actionCreate_Voice_File, &QAction::triggered, this, &RbUtilQt::createVoiceFile); |
154 | connect(ui.actionCreate_Talk_Files, SIGNAL(triggered()), this, SLOT(createTalkFiles())); | 154 | connect(ui.actionCreate_Talk_Files, &QAction::triggered, this, &RbUtilQt::createTalkFiles); |
155 | connect(ui.actionRemove_bootloader, SIGNAL(triggered()), this, SLOT(uninstallBootloader())); | 155 | connect(ui.actionRemove_bootloader, &QAction::triggered, this, &RbUtilQt::uninstallBootloader); |
156 | connect(ui.actionUninstall_Rockbox, SIGNAL(triggered()), this, SLOT(uninstall())); | 156 | connect(ui.actionUninstall_Rockbox, &QAction::triggered, this, &RbUtilQt::uninstall); |
157 | connect(ui.action_System_Info, SIGNAL(triggered()), this, SLOT(sysinfo())); | 157 | connect(ui.action_System_Info, &QAction::triggered, this, &RbUtilQt::sysinfo); |
158 | connect(ui.action_Trace, SIGNAL(triggered()), this, SLOT(trace())); | 158 | connect(ui.action_Trace, &QAction::triggered, this, &RbUtilQt::trace); |
159 | connect(ui.actionShow_Changelog, SIGNAL(triggered()), this, SLOT(changelog())); | 159 | connect(ui.actionShow_Changelog, &QAction::triggered, this, &RbUtilQt::changelog); |
160 | 160 | ||
161 | #if !defined(STATIC) | 161 | #if !defined(STATIC) |
162 | ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false); | 162 | ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false); |
@@ -205,8 +205,8 @@ void RbUtilQt::downloadInfo() | |||
205 | { | 205 | { |
206 | // try to get the current build information | 206 | // try to get the current build information |
207 | daily = new HttpGet(this); | 207 | daily = new HttpGet(this); |
208 | connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 208 | connect(daily, &HttpGet::done, this, &RbUtilQt::downloadDone); |
209 | connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort())); | 209 | connect(qApp, &QGuiApplication::lastWindowClosed, daily, &HttpGet::abort); |
210 | daily->setCache(false); | 210 | daily->setCache(false); |
211 | ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); | 211 | ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); |
212 | LOG_INFO() << "downloading build info"; | 212 | LOG_INFO() << "downloading build info"; |
@@ -327,7 +327,7 @@ void RbUtilQt::help() | |||
327 | void RbUtilQt::configDialog() | 327 | void RbUtilQt::configDialog() |
328 | { | 328 | { |
329 | Config *cw = new Config(this); | 329 | Config *cw = new Config(this); |
330 | connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); | 330 | connect(cw, &Config::settingsUpdated, this, &RbUtilQt::updateSettings); |
331 | cw->show(); | 331 | cw->show(); |
332 | } | 332 | } |
333 | 333 | ||
@@ -429,7 +429,7 @@ void RbUtilQt::createTalkFiles(void) | |||
429 | { | 429 | { |
430 | if(chkConfig(this)) return; | 430 | if(chkConfig(this)) return; |
431 | InstallTalkWindow *installWindow = new InstallTalkWindow(this); | 431 | InstallTalkWindow *installWindow = new InstallTalkWindow(this); |
432 | connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); | 432 | connect(installWindow, &InstallTalkWindow::settingsUpdated, this, &RbUtilQt::updateSettings); |
433 | installWindow->show(); | 433 | installWindow->show(); |
434 | 434 | ||
435 | } | 435 | } |
@@ -439,7 +439,7 @@ void RbUtilQt::createVoiceFile(void) | |||
439 | if(chkConfig(this)) return; | 439 | if(chkConfig(this)) return; |
440 | CreateVoiceWindow *installWindow = new CreateVoiceWindow(this); | 440 | CreateVoiceWindow *installWindow = new CreateVoiceWindow(this); |
441 | 441 | ||
442 | connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); | 442 | connect(installWindow, &CreateVoiceWindow::settingsUpdated, this, &RbUtilQt::updateSettings); |
443 | installWindow->show(); | 443 | installWindow->show(); |
444 | } | 444 | } |
445 | 445 | ||
@@ -503,7 +503,7 @@ void RbUtilQt::uninstallBootloader(void) | |||
503 | } | 503 | } |
504 | 504 | ||
505 | connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 505 | connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
506 | connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 506 | connect(bl, &BootloaderInstallBase::logProgress, logger, &ProgressLoggerGui::setProgress); |
507 | connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished())); | 507 | connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished())); |
508 | // pass Abort button click signal to current installer | 508 | // pass Abort button click signal to current installer |
509 | connect(logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); | 509 | connect(logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); |
@@ -608,8 +608,8 @@ void RbUtilQt::checkUpdate(void) | |||
608 | #endif | 608 | #endif |
609 | 609 | ||
610 | update = new HttpGet(this); | 610 | update = new HttpGet(this); |
611 | connect(update, SIGNAL(done(bool)), this, SLOT(downloadUpdateDone(bool))); | 611 | connect(update, &HttpGet::done, this, &RbUtilQt::downloadUpdateDone); |
612 | connect(qApp, SIGNAL(lastWindowClosed()), update, SLOT(abort())); | 612 | connect(qApp, &QGuiApplication::lastWindowClosed, update, &HttpGet::abort); |
613 | 613 | ||
614 | ui.statusbar->showMessage(tr("Checking for update ...")); | 614 | ui.statusbar->showMessage(tr("Checking for update ...")); |
615 | update->getFile(QUrl(url)); | 615 | update->getFile(QUrl(url)); |
diff --git a/utils/rbutilqt/test/test-httpget.cpp b/utils/rbutilqt/test/test-httpget.cpp index 62aace0352..26945e4e15 100644 --- a/utils/rbutilqt/test/test-httpget.cpp +++ b/utils/rbutilqt/test/test-httpget.cpp | |||
@@ -51,8 +51,8 @@ | |||
51 | // works asynchronously, this means that all the communication is done | 51 | // works asynchronously, this means that all the communication is done |
52 | // in the two slots readClient() and discardClient(). | 52 | // in the two slots readClient() and discardClient(). |
53 | QTcpSocket* s = new QTcpSocket(this); | 53 | QTcpSocket* s = new QTcpSocket(this); |
54 | connect(s, SIGNAL(readyRead()), this, SLOT(readClient())); | 54 | connect(s, &QIODevice::readyRead, this, &HttpDaemon::readClient); |
55 | connect(s, SIGNAL(disconnected()), this, SLOT(discardClient())); | 55 | connect(s, &QAbstractSocket::disconnected, this, &HttpDaemon::discardClient); |
56 | s->setSocketDescriptor(socket); | 56 | s->setSocketDescriptor(socket); |
57 | } | 57 | } |
58 | QList<QString> lastRequestData(void) | 58 | QList<QString> lastRequestData(void) |
@@ -183,8 +183,8 @@ void TestHttpGet::init(void) | |||
183 | m_port = QString("%1").arg(m_daemon->port()).toLatin1(); | 183 | m_port = QString("%1").arg(m_daemon->port()).toLatin1(); |
184 | m_cachedir = temporaryFolder(); | 184 | m_cachedir = temporaryFolder(); |
185 | m_getter = new HttpGet(this); | 185 | m_getter = new HttpGet(this); |
186 | m_doneSpy = new QSignalSpy(m_getter, SIGNAL(done(bool))); | 186 | m_doneSpy = new QSignalSpy(m_getter, &HttpGet::done); |
187 | m_progressSpy = new QSignalSpy(m_getter, SIGNAL(dataReadProgress(int, int))); | 187 | m_progressSpy = new QSignalSpy(m_getter, &HttpGet::dataReadProgress); |
188 | m_waitTimeoutOccured = false; | 188 | m_waitTimeoutOccured = false; |
189 | } | 189 | } |
190 | 190 | ||
@@ -201,7 +201,7 @@ void TestHttpGet::cleanup(void) | |||
201 | 201 | ||
202 | void TestHttpGet::testFileUrlRequest(void) | 202 | void TestHttpGet::testFileUrlRequest(void) |
203 | { | 203 | { |
204 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 204 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
205 | 205 | ||
206 | QString teststring = "The quick brown fox jumps over the lazy dog."; | 206 | QString teststring = "The quick brown fox jumps over the lazy dog."; |
207 | QTemporaryFile datafile; | 207 | QTemporaryFile datafile; |
@@ -239,7 +239,7 @@ void TestHttpGet::testUncachedRepeatedRequest(void) | |||
239 | "<html></html>\r\n\r\n"); | 239 | "<html></html>\r\n\r\n"); |
240 | m_daemon->setResponsesToSend(responses); | 240 | m_daemon->setResponsesToSend(responses); |
241 | 241 | ||
242 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 242 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
243 | 243 | ||
244 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); | 244 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); |
245 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 245 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
@@ -287,7 +287,7 @@ void TestHttpGet::testCachedRequest(void) | |||
287 | "\r\n"); | 287 | "\r\n"); |
288 | m_daemon->setResponsesToSend(responses); | 288 | m_daemon->setResponsesToSend(responses); |
289 | 289 | ||
290 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 290 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
291 | 291 | ||
292 | m_getter->setCache(m_cachedir); | 292 | m_getter->setCache(m_cachedir); |
293 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); | 293 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); |
@@ -336,7 +336,7 @@ void TestHttpGet::testUserAgent(void) | |||
336 | "<html></html>\r\n\r\n"); | 336 | "<html></html>\r\n\r\n"); |
337 | m_daemon->setResponsesToSend(responses); | 337 | m_daemon->setResponsesToSend(responses); |
338 | 338 | ||
339 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 339 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
340 | 340 | ||
341 | m_getter->setGlobalUserAgent(TEST_USER_AGENT); | 341 | m_getter->setGlobalUserAgent(TEST_USER_AGENT); |
342 | m_getter->setCache(m_cachedir); | 342 | m_getter->setCache(m_cachedir); |
@@ -376,7 +376,7 @@ void TestHttpGet::testUncachedMovedRequest(void) | |||
376 | "<html></html>\r\n\r\n"); | 376 | "<html></html>\r\n\r\n"); |
377 | m_daemon->setResponsesToSend(responses); | 377 | m_daemon->setResponsesToSend(responses); |
378 | 378 | ||
379 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 379 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
380 | 380 | ||
381 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.php?var=1&b=foo")); | 381 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.php?var=1&b=foo")); |
382 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 382 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
@@ -391,7 +391,7 @@ void TestHttpGet::testUncachedMovedRequest(void) | |||
391 | 391 | ||
392 | void TestHttpGet::testResponseCode(void) | 392 | void TestHttpGet::testResponseCode(void) |
393 | { | 393 | { |
394 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 394 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
395 | 395 | ||
396 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); | 396 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); |
397 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 397 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
@@ -416,7 +416,7 @@ void TestHttpGet::testContentToBuffer(void) | |||
416 | TEST_BINARY_BLOB); | 416 | TEST_BINARY_BLOB); |
417 | m_daemon->setResponsesToSend(responses); | 417 | m_daemon->setResponsesToSend(responses); |
418 | 418 | ||
419 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 419 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
420 | 420 | ||
421 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); | 421 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); |
422 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 422 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
@@ -443,7 +443,7 @@ void TestHttpGet::testContentToFile(void) | |||
443 | TEST_BINARY_BLOB); | 443 | TEST_BINARY_BLOB); |
444 | m_daemon->setResponsesToSend(responses); | 444 | m_daemon->setResponsesToSend(responses); |
445 | 445 | ||
446 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 446 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
447 | 447 | ||
448 | m_getter->setFile(&tf); | 448 | m_getter->setFile(&tf); |
449 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); | 449 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.txt")); |
@@ -462,7 +462,7 @@ void TestHttpGet::testContentToFile(void) | |||
462 | 462 | ||
463 | void TestHttpGet::testNoServer(void) | 463 | void TestHttpGet::testNoServer(void) |
464 | { | 464 | { |
465 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 465 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
466 | m_getter->getFile(QUrl("http://localhost:53/test1.txt")); | 466 | m_getter->getFile(QUrl("http://localhost:53/test1.txt")); |
467 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 467 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
468 | QCoreApplication::processEvents(); | 468 | QCoreApplication::processEvents(); |
@@ -494,7 +494,7 @@ void TestHttpGet::testServerTimestamp(void) | |||
494 | 494 | ||
495 | m_daemon->setResponsesToSend(responses); | 495 | m_daemon->setResponsesToSend(responses); |
496 | 496 | ||
497 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 497 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
498 | 498 | ||
499 | int count = m_doneSpy->count(); | 499 | int count = m_doneSpy->count(); |
500 | for(int i = 0; i < responses.size(); ++i) { | 500 | for(int i = 0; i < responses.size(); ++i) { |
@@ -523,7 +523,7 @@ void TestHttpGet::testMovedQuery(void) | |||
523 | "<html></html>\r\n\r\n"); | 523 | "<html></html>\r\n\r\n"); |
524 | m_daemon->setResponsesToSend(responses); | 524 | m_daemon->setResponsesToSend(responses); |
525 | 525 | ||
526 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, SLOT(waitTimeout(void))); | 526 | QTimer::singleShot(TEST_HTTP_TIMEOUT, this, &TestHttpGet::waitTimeout); |
527 | 527 | ||
528 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.php?var=1&b=foo")); | 528 | m_getter->getFile(QUrl("http://localhost:" + m_port + "/test1.php?var=1&b=foo")); |
529 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) | 529 | while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false) |
diff --git a/utils/rbutilqt/themesinstallwindow.cpp b/utils/rbutilqt/themesinstallwindow.cpp index c1a54feb74..358bd7f1a1 100644 --- a/utils/rbutilqt/themesinstallwindow.cpp +++ b/utils/rbutilqt/themesinstallwindow.cpp | |||
@@ -43,12 +43,12 @@ ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) | |||
43 | ui.listThemes->setLayoutDirection(Qt::LeftToRight); | 43 | ui.listThemes->setLayoutDirection(Qt::LeftToRight); |
44 | ui.themeDescription->setLayoutDirection(Qt::LeftToRight); | 44 | ui.themeDescription->setLayoutDirection(Qt::LeftToRight); |
45 | 45 | ||
46 | connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(close())); | 46 | connect(ui.buttonCancel, &QAbstractButton::clicked, this, &QWidget::close); |
47 | connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); | 47 | connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); |
48 | connect(ui.listThemes, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), | 48 | connect(ui.listThemes, &QListWidget::currentItemChanged, |
49 | this, SLOT(updateDetails(QListWidgetItem*, QListWidgetItem*))); | 49 | this, &ThemesInstallWindow::updateDetails); |
50 | connect(ui.listThemes, SIGNAL(itemSelectionChanged()), this, SLOT(updateSize())); | 50 | connect(ui.listThemes, &QListWidget::itemSelectionChanged, this, &ThemesInstallWindow::updateSize); |
51 | connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool))); | 51 | connect(&igetter, &HttpGet::done, this, &ThemesInstallWindow::updateImage); |
52 | 52 | ||
53 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) | 53 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
54 | igetter.setCache(true); | 54 | igetter.setCache(true); |
@@ -130,7 +130,7 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
130 | getter->abort(); | 130 | getter->abort(); |
131 | logger->setFinished(); | 131 | logger->setFinished(); |
132 | disconnect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 132 | disconnect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
133 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 133 | connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close); |
134 | return; | 134 | return; |
135 | } | 135 | } |
136 | // handle possible error codes | 136 | // handle possible error codes |
@@ -140,7 +140,7 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
140 | logger->addItem(tr("the following error occured:\n%1") | 140 | logger->addItem(tr("the following error occured:\n%1") |
141 | .arg(iniDetails.value("error/description", "unknown error").toString()), LOGERROR); | 141 | .arg(iniDetails.value("error/description", "unknown error").toString()), LOGERROR); |
142 | logger->setFinished(); | 142 | logger->setFinished(); |
143 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 143 | connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close); |
144 | return; | 144 | return; |
145 | } | 145 | } |
146 | logger->addItem(tr("done."), LOGOK); | 146 | logger->addItem(tr("done."), LOGOK); |
@@ -371,11 +371,11 @@ void ThemesInstallWindow::install() | |||
371 | installer->setCache(true); | 371 | installer->setCache(true); |
372 | 372 | ||
373 | if(!windowSelectOnly) { | 373 | if(!windowSelectOnly) { |
374 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 374 | connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close); |
375 | connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished())); | 375 | connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished())); |
376 | } | 376 | } |
377 | connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 377 | connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
378 | connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 378 | connect(installer, &ZipInstaller::logProgress, logger, &ProgressLoggerGui::setProgress); |
379 | connect(installer, SIGNAL(done(bool)), this, SIGNAL(done(bool))); | 379 | connect(installer, SIGNAL(done(bool)), this, SIGNAL(done(bool))); |
380 | connect(logger, SIGNAL(aborted()), installer, SLOT(abort())); | 380 | connect(logger, SIGNAL(aborted()), installer, SLOT(abort())); |
381 | installer->install(); | 381 | installer->install(); |
diff --git a/utils/rbutilqt/uninstallwindow.cpp b/utils/rbutilqt/uninstallwindow.cpp index 264b73f544..bbce88ffc2 100644 --- a/utils/rbutilqt/uninstallwindow.cpp +++ b/utils/rbutilqt/uninstallwindow.cpp | |||
@@ -24,17 +24,17 @@ UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent) | |||
24 | { | 24 | { |
25 | ui.setupUi(this); | 25 | ui.setupUi(this); |
26 | ui.UninstalllistWidget->setAlternatingRowColors(true); | 26 | ui.UninstalllistWidget->setAlternatingRowColors(true); |
27 | connect(ui.UninstalllistWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged())); | 27 | connect(ui.UninstalllistWidget,&QListWidget::itemSelectionChanged,this,&UninstallWindow::selectionChanged); |
28 | connect(ui.CompleteRadioBtn,SIGNAL(toggled(bool)),this,SLOT(UninstallMethodChanged(bool))); | 28 | connect(ui.CompleteRadioBtn,&QAbstractButton::toggled,this,&UninstallWindow::UninstallMethodChanged); |
29 | 29 | ||
30 | QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); | 30 | QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); |
31 | 31 | ||
32 | uninstaller = new Uninstaller(this,mountpoint); | 32 | uninstaller = new Uninstaller(this,mountpoint); |
33 | logger = new ProgressLoggerGui(this); | 33 | logger = new ProgressLoggerGui(this); |
34 | connect(uninstaller, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 34 | connect(uninstaller, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
35 | connect(uninstaller, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 35 | connect(uninstaller, &Uninstaller::logProgress, logger, &ProgressLoggerGui::setProgress); |
36 | connect(uninstaller, SIGNAL(logFinished(void)), logger, SLOT(setFinished(void))); | 36 | connect(uninstaller, SIGNAL(logFinished(void)), logger, SLOT(setFinished(void))); |
37 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 37 | connect(logger, &ProgressLoggerGui::closed, this, &QWidget::close); |
38 | 38 | ||
39 | // disable smart uninstall, if not possible | 39 | // disable smart uninstall, if not possible |
40 | if(!uninstaller->uninstallPossible()) | 40 | if(!uninstaller->uninstallPossible()) |