summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2014-10-30 17:50:03 +0100
committerMontel Laurent <[email protected]>2014-10-30 17:50:03 +0100
commit0051463bfe86624843d149412eaaf761c2de619a (patch)
tree103f724d3b2f93ba7b95a67e6641dafedee86a75
parentdd470bb2bb18c4b028c42364567246068c9561b4 (diff)
Port to new connect api
-rw-r--r--app/batchextract.cpp1
-rw-r--r--kerfuffle/archive.cpp14
-rw-r--r--kerfuffle/cliinterface.cpp4
-rw-r--r--part/part.cpp1
-rw-r--r--plugins/libsinglefileplugin/singlefileplugin.cpp1
5 files changed, 7 insertions, 14 deletions
diff --git a/app/batchextract.cpp b/app/batchextract.cpp
index ee5895c..6772508 100644
--- a/app/batchextract.cpp
+++ b/app/batchextract.cpp
@@ -288,4 +288,3 @@ bool BatchExtract::showExtractDialog()
return true;
}
-#include <batchextract.moc>
diff --git a/kerfuffle/archive.cpp b/kerfuffle/archive.cpp
index 8a51455..4980091 100644
--- a/kerfuffle/archive.cpp
+++ b/kerfuffle/archive.cpp
@@ -158,8 +158,7 @@ ListJob* Archive::list()
//if this job has not been listed before, we grab the opportunity to
//collect some information about the archive
if (!m_hasBeenListed) {
- connect(job, SIGNAL(result(KJob*)),
- this, SLOT(onListFinished(KJob*)));
+ connect(job, &ListJob::result, this, &Archive::onListFinished);
}
return job;
}
@@ -178,8 +177,7 @@ AddJob* Archive::addFiles(const QStringList & files, const CompressionOptions& o
{
Q_ASSERT(!m_iface->isReadOnly());
AddJob *newJob = new AddJob(files, options, static_cast<ReadWriteArchiveInterface*>(m_iface), this);
- connect(newJob, SIGNAL(result(KJob*)),
- this, SLOT(onAddFinished(KJob*)));
+ connect(newJob, &AddJob::result, this, &Archive::onAddFinished);
return newJob;
}
@@ -237,15 +235,13 @@ void Archive::onListFinished(KJob* job)
void Archive::listIfNotListed()
{
if (!m_hasBeenListed) {
- KJob *job = list();
+ ListJob *job = list();
- connect(job, SIGNAL(userQuery(Kerfuffle::Query*)),
- SLOT(onUserQuery(Kerfuffle::Query*)));
+ connect(job, &ListJob::userQuery, this, &Archive::onUserQuery);
QEventLoop loop(this);
- connect(job, SIGNAL(result(KJob*)),
- &loop, SLOT(quit()));
+ connect(job, &KJob::result, &loop, &QEventLoop::quit);
job->start();
loop.exec(); // krazy:exclude=crashy
}
diff --git a/kerfuffle/cliinterface.cpp b/kerfuffle/cliinterface.cpp
index 214915f..fce523e 100644
--- a/kerfuffle/cliinterface.cpp
+++ b/kerfuffle/cliinterface.cpp
@@ -357,7 +357,7 @@ bool CliInterface::runProcess(const QStringList& programNames, const QStringList
m_process = new KPtyProcess;
m_process->setPtyChannels(KPtyProcess::StdinChannel);
QEventLoop loop;
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), &loop, SLOT(quit()), Qt::DirectConnection);
+ connect(m_process, static_cast<void (KPtyProcess::*)(int, QProcess::ExitStatus)>(&KPtyProcess::finished), &loop, &QEventLoop::quit, Qt::DirectConnection);
#endif
m_process->setOutputChannelMode(KProcess::MergedChannels);
@@ -365,7 +365,7 @@ bool CliInterface::runProcess(const QStringList& programNames, const QStringList
m_process->setProgram(programPath, arguments);
connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(readStdout()), Qt::DirectConnection);
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(processFinished(int,QProcess::ExitStatus)), Qt::DirectConnection);
+ connect(m_process, static_cast<void (KPtyProcess::*)(int, QProcess::ExitStatus)>(&KPtyProcess::finished), this, &CliInterface::processFinished, Qt::DirectConnection);
m_stdOutData.clear();
diff --git a/part/part.cpp b/part/part.cpp
index 27bf2b2..c134004 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -45,7 +45,6 @@
#include <KRun>
#include <KSelectAction>
#include <KStandardGuiItem>
-#include <KTempDir>
#include <KToggleAction>
#include <KLocalizedString>
diff --git a/plugins/libsinglefileplugin/singlefileplugin.cpp b/plugins/libsinglefileplugin/singlefileplugin.cpp
index 228cc6d..6fa0500 100644
--- a/plugins/libsinglefileplugin/singlefileplugin.cpp
+++ b/plugins/libsinglefileplugin/singlefileplugin.cpp
@@ -157,4 +157,3 @@ const QString LibSingleFileInterface::uncompressedFileName() const
return uncompressedName + QLatin1String( ".uncompressed" );
}
-#include "singlefileplugin.moc"