1
0
Fork 0
forked from len0rd/rockbox

rbutil: Modernize connect() to new pointer-to-member syntax.

Change-Id: I6bb86e34438eef10813f0d19e910599156a876e6
This commit is contained in:
Dominik Riebeling 2020-11-21 10:21:31 +01:00
parent f29b81d521
commit efacce58eb
13 changed files with 26 additions and 26 deletions

View file

@ -57,7 +57,7 @@ bool BootloaderInstallAms::install(void)
// download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallAms::installStage2);
downloadBlStart(m_blurl);
return true;

View file

@ -48,11 +48,11 @@ void BootloaderInstallBase::downloadBlStart(QUrl source)
{
m_http.setFile(&m_tempfile);
m_http.setCache(true);
connect(&m_http, SIGNAL(done(bool)), this, SLOT(downloadBlFinish(bool)));
connect(&m_http, &HttpGet::done, this, &BootloaderInstallBase::downloadBlFinish);
// connect the http read signal to our logProgess *signal*
// to immediately emit it without any helper function.
connect(&m_http, SIGNAL(dataReadProgress(int, int)),
this, SIGNAL(logProgress(int, int)));
connect(&m_http, &HttpGet::dataReadProgress,
this, &BootloaderInstallBase::logProgress);
m_http.getFile(source);
}

View file

@ -88,7 +88,7 @@ bool BootloaderInstallBSPatch::install(void)
LOG_INFO() << "downloading bootloader";
// download bootloader from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallBSPatch::installStage2);
downloadBlStart(m_blurl);
return true;
}
@ -109,7 +109,7 @@ void BootloaderInstallBSPatch::installStage2(void)
m_thread->setOutputFile(m_patchedFile.fileName());
m_tempfile.close();
m_patchedFile.close();
connect(m_thread, SIGNAL(finished()), this, SLOT(installStage3()));
connect(m_thread, &QThread::finished, this, &BootloaderInstallBSPatch::installStage3);
m_thread->start();
}

View file

@ -49,7 +49,7 @@ bool BootloaderInstallChinaChip::install()
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallChinaChip::installStage2);
downloadBlStart(m_blurl);
return true;

View file

@ -34,7 +34,7 @@ bool BootloaderInstallFile::install(void)
emit logItem(tr("Downloading bootloader"), LOGINFO);
LOG_INFO() << "installing bootloader";
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallFile::installStage2);
return true;
}

View file

@ -122,7 +122,7 @@ bool BootloaderInstallHex::install(void)
// download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallHex::installStage2);
downloadBlStart(m_blurl);
return true;

View file

@ -98,7 +98,7 @@ bool BootloaderInstallImx::install(void)
LOG_INFO() << "downloading bootloader";
// download bootloader from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallImx::installStage2);
downloadBlStart(m_blurl);
return true;
}
@ -120,7 +120,7 @@ void BootloaderInstallImx::installStage2(void)
m_thread->setOutputFile(m_patchedFile.fileName());
m_tempfile.close();
m_patchedFile.close();
connect(m_thread, SIGNAL(finished()), this, SLOT(installStage3()));
connect(m_thread, &QThread::finished, this, &BootloaderInstallImx::installStage3);
connect(m_thread, SIGNAL(terminated()), this, SLOT(installStage3()));
m_thread->start();
}

View file

@ -80,7 +80,7 @@ bool BootloaderInstallIpod::install(void)
emit logItem(tr("Downloading bootloader file"), LOGINFO);
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallIpod::installStage2);
return true;
}

View file

@ -34,7 +34,7 @@ bool BootloaderInstallMi4::install(void)
emit logItem(tr("Downloading bootloader"), LOGINFO);
LOG_INFO() << "installing bootloader";
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallMi4::installStage2);
return true;
}

View file

@ -52,7 +52,7 @@ bool BootloaderInstallMpio::install(void)
// download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallMpio::installStage2);
downloadBlStart(m_blurl);
return true;

View file

@ -66,7 +66,7 @@ bool BootloaderInstallS5l::installStage1(void)
if (doInstall) {
// download firmware from server
emit logItem(tr("Downloading bootloader file..."), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStageMkdfu()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallS5l::installStageMkdfu);
downloadBlStart(m_blurl);
}
else {
@ -87,8 +87,8 @@ void BootloaderInstallS5l::installStageMkdfu(void)
setProgress(0);
aborted = false;
connect(this, SIGNAL(installAborted()), this, SLOT(abortInstall()));
connect(this, SIGNAL(done(bool)), this, SLOT(installDone(bool)));
connect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall);
connect(this, &BootloaderInstallBase::done, this, &BootloaderInstallS5l::installDone);
if (doInstall) {
dfu_type = DFU_INST;
@ -142,7 +142,7 @@ void BootloaderInstallS5l::installStageWaitForEject(void)
LOGWARNING);
actionShown = true;
}
QTimer::singleShot(250, this, SLOT(installStageWaitForEject()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageWaitForEject);
return;
}
emit logItem(tr("Device successfully ejected."), LOGINFO);
@ -169,7 +169,7 @@ void BootloaderInstallS5l::installStageWaitForProcs(void)
" Quit iTunes application."), LOGWARNING);
actionShown = true;
}
QTimer::singleShot(250, this, SLOT(installStageWaitForProcs()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageWaitForProcs);
return;
}
if (actionShown) {
@ -206,7 +206,7 @@ void BootloaderInstallS5l::installStageWaitForSpindown(void)
return; /* aborted */
if (progressTimer.elapsed() < progressTimeout) {
QTimer::singleShot(250, this, SLOT(installStageWaitForSpindown()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageWaitForSpindown);
return;
}
@ -232,7 +232,7 @@ void BootloaderInstallS5l::installStageWaitForDfu(void)
scanTimer.start();
}
if (!scanSuccess) {
QTimer::singleShot(250, this, SLOT(installStageWaitForDfu()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageWaitForDfu);
return;
}
emit logItem(tr("DFU mode detected."), LOGINFO);
@ -256,7 +256,7 @@ void BootloaderInstallS5l::installStageSendDfu(void)
return; /* aborted */
if (progressTimer.elapsed() < progressTimeout) {
QTimer::singleShot(250, this, SLOT(installStageSendDfu()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageSendDfu);
return;
}
@ -324,7 +324,7 @@ void BootloaderInstallS5l::installStageWaitForRemount(void)
LOGWARNING);
actionShown = true;
}
QTimer::singleShot(250, this, SLOT(installStageWaitForRemount()));
QTimer::singleShot(250, this, &BootloaderInstallS5l::installStageWaitForRemount);
return;
}
emit logItem(tr("Device remounted."), LOGINFO);
@ -350,7 +350,7 @@ void BootloaderInstallS5l::abortInstall(void)
{
LOG_INFO() << "abortInstall";
aborted = true;
disconnect(this, SIGNAL(installAborted()), this, SLOT(abortInstall()));
disconnect(this, &BootloaderInstallBase::installAborted, this, &BootloaderInstallS5l::abortInstall);
}

View file

@ -79,7 +79,7 @@ bool BootloaderInstallSansa::install(void)
emit logItem(tr("Downloading bootloader file"), LOGINFO);
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallSansa::installStage2);
return true;
}

View file

@ -49,7 +49,7 @@ bool BootloaderInstallTcc::install(void)
// Download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
connect(this, &BootloaderInstallBase::downloadDone, this, &BootloaderInstallTcc::installStage2);
downloadBlStart(m_blurl);
return true;