summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2014-10-08 08:44:40 +0200
committerMontel Laurent <[email protected]>2014-10-08 08:44:40 +0200
commit1d0e3df9ab6ba5278377a95f86b9e6cb329b4cf6 (patch)
tree373324043caf6be634b763df666109b599c4e5df
parent560c37d81a1285bcf60c96211d59c48803a5633b (diff)
Port to new connect api.
-rw-r--r--app/extractHereDndPlugin.cpp2
-rw-r--r--kerfuffle/adddialog.cpp5
-rw-r--r--kerfuffle/addtoarchive.cpp3
-rw-r--r--kerfuffle/extractiondialog.cpp2
-rw-r--r--kerfuffle/jobs.cpp3
-rw-r--r--part/archivemodel.cpp27
-rw-r--r--part/archiveview.cpp9
-rw-r--r--part/arkviewer.cpp5
8 files changed, 21 insertions, 35 deletions
diff --git a/app/extractHereDndPlugin.cpp b/app/extractHereDndPlugin.cpp
index 0305e83..cf08a33 100644
--- a/app/extractHereDndPlugin.cpp
+++ b/app/extractHereDndPlugin.cpp
@@ -72,7 +72,7 @@ void ExtractHereDndPlugin::setup(const KFileItemListProperties& popupMenuInfo,
KAction *action = new KAction(KIcon(QLatin1String("archive-extract")),
extractHereMessage, NULL);
- connect(action, SIGNAL(triggered()), this, SLOT(slotTriggered()));
+ connect(action, &KAction::triggered, this, &ExtractHereDndPlugin::slotTriggered);
userActions.append(action);
m_dest = destination;
diff --git a/kerfuffle/adddialog.cpp b/kerfuffle/adddialog.cpp
index 436f5b3..0e4e718 100644
--- a/kerfuffle/adddialog.cpp
+++ b/kerfuffle/adddialog.cpp
@@ -38,6 +38,7 @@
#include <QFileInfo>
#include <QStandardItemModel>
+#include <QPushButton>
namespace Kerfuffle
{
@@ -61,11 +62,11 @@ AddDialog::AddDialog(const QStringList& itemsToAdd,
setOperationMode(KFileDialog::Saving);
setMode(KFile::File | KFile::LocalOnly);
setConfirmOverwrite(true);
- //setCaption(i18n("Compress to Archive"));
+ setWindowTitle(i18n("Compress to Archive"));
loadConfiguration();
- connect(this, SIGNAL(okClicked()), SLOT(updateDefaultMimeType()));
+ connect(okButton(), &QPushButton::clicked, this, &AddDialog::updateDefaultMimeType);
m_ui = new AddDialogUI(this);
// mainWidget()->layout()->addWidget(m_ui);
diff --git a/kerfuffle/addtoarchive.cpp b/kerfuffle/addtoarchive.cpp
index 1fb0d4d..e6ac618 100644
--- a/kerfuffle/addtoarchive.cpp
+++ b/kerfuffle/addtoarchive.cpp
@@ -190,8 +190,7 @@ void AddToArchive::slotStartJob(void)
KIO::getJobTracker()->registerJob(job);
- connect(job, SIGNAL(result(KJob*)),
- this, SLOT(slotFinished(KJob*)));
+ connect(job, &Kerfuffle::AddJob::result, this, &AddToArchive::slotFinished);
job->start();
}
diff --git a/kerfuffle/extractiondialog.cpp b/kerfuffle/extractiondialog.cpp
index 044949c..cccd3cd 100644
--- a/kerfuffle/extractiondialog.cpp
+++ b/kerfuffle/extractiondialog.cpp
@@ -70,7 +70,7 @@ ExtractionDialog::ExtractionDialog(QWidget *parent)
loadSettings();
- connect(this, SIGNAL(finished(int)), SLOT(writeSettings()));
+ connect(this, &ExtractionDialog::finished, this, &ExtractionDialog::writeSettings);
}
void ExtractionDialog::loadSettings()
diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
index 1a8d40f..d3c1a6e 100644
--- a/kerfuffle/jobs.cpp
+++ b/kerfuffle/jobs.cpp
@@ -181,8 +181,7 @@ ListJob::ListJob(ReadOnlyArchiveInterface *interface, QObject *parent)
, m_isPasswordProtected(false)
, m_extractedFilesSize(0)
{
- connect(this, SIGNAL(newEntry(ArchiveEntry)),
- this, SLOT(onNewEntry(ArchiveEntry)));
+ connect(this, &ListJob::newEntry, this, &ListJob::onNewEntry);
}
void ListJob::doWork()
diff --git a/part/archivemodel.cpp b/part/archivemodel.cpp
index d03df1c..62c6830 100644
--- a/part/archivemodel.cpp
+++ b/part/archivemodel.cpp
@@ -875,14 +875,11 @@ KJob* ArchiveModel::setArchive(Kerfuffle::Archive *archive)
if (m_archive) {
job = m_archive->list(); // TODO: call "open" or "create"?
- connect(job, SIGNAL(newEntry(ArchiveEntry)),
- this, SLOT(slotNewEntryFromSetArchive(ArchiveEntry)));
+ connect(job, &Kerfuffle::ListJob::newEntry, this, &ArchiveModel::slotNewEntryFromSetArchive);
- connect(job, SIGNAL(result(KJob*)),
- this, SLOT(slotLoadingFinished(KJob*)));
+ connect(job, &Kerfuffle::ListJob::result, this, &ArchiveModel::slotLoadingFinished);
- connect(job, SIGNAL(userQuery(Kerfuffle::Query*)),
- this, SLOT(slotUserQuery(Kerfuffle::Query*)));
+ connect(job, &Kerfuffle::ListJob::userQuery, this, &ArchiveModel::slotUserQuery);
emit loadingStarted();
@@ -904,8 +901,7 @@ ExtractJob* ArchiveModel::extractFiles(const QList<QVariant>& files, const QStri
{
Q_ASSERT(m_archive);
ExtractJob *newJob = m_archive->copyFiles(files, destinationDir, options);
- connect(newJob, SIGNAL(userQuery(Kerfuffle::Query*)),
- this, SLOT(slotUserQuery(Kerfuffle::Query*)));
+ connect(newJob, &ExtractJob::userQuery, this, &ArchiveModel::slotUserQuery);
return newJob;
}
@@ -917,10 +913,8 @@ AddJob* ArchiveModel::addFiles(const QStringList & filenames, const CompressionO
if (!m_archive->isReadOnly()) {
AddJob *job = m_archive->addFiles(filenames, options);
- connect(job, SIGNAL(newEntry(ArchiveEntry)),
- this, SLOT(slotNewEntry(ArchiveEntry)));
- connect(job, SIGNAL(userQuery(Kerfuffle::Query*)),
- this, SLOT(slotUserQuery(Kerfuffle::Query*)));
+ connect(job, &AddJob::newEntry, this, &ArchiveModel::slotNewEntry);
+ connect(job, &AddJob::userQuery, this, &ArchiveModel::slotUserQuery);
return job;
@@ -933,14 +927,11 @@ DeleteJob* ArchiveModel::deleteFiles(const QList<QVariant> & files)
Q_ASSERT(m_archive);
if (!m_archive->isReadOnly()) {
DeleteJob *job = m_archive->deleteFiles(files);
- connect(job, SIGNAL(entryRemoved(QString)),
- this, SLOT(slotEntryRemoved(QString)));
+ connect(job, &DeleteJob::entryRemoved, this, &ArchiveModel::slotEntryRemoved);
- connect(job, SIGNAL(finished(KJob*)),
- this, SLOT(slotCleanupEmptyDirs()));
+ connect(job, &DeleteJob::finished, this, &ArchiveModel::slotCleanupEmptyDirs);
- connect(job, SIGNAL(userQuery(Kerfuffle::Query*)),
- this, SLOT(slotUserQuery(Kerfuffle::Query*)));
+ connect(job, &DeleteJob::userQuery, this, &ArchiveModel::slotUserQuery);
return job;
}
return 0;
diff --git a/part/archiveview.cpp b/part/archiveview.cpp
index 8318165..b5b3526 100644
--- a/part/archiveview.cpp
+++ b/part/archiveview.cpp
@@ -34,12 +34,9 @@ ArchiveView::ArchiveView(QWidget *parent)
: QTreeView(parent)
, m_mouseButtons(Qt::NoButton)
{
- connect(this, SIGNAL(pressed(QModelIndex)),
- SLOT(updateMouseButtons()));
- connect(this, SIGNAL(clicked(QModelIndex)),
- SLOT(slotClicked(QModelIndex)));
- connect(this, SIGNAL(doubleClicked(QModelIndex)),
- SLOT(slotDoubleClicked(QModelIndex)));
+ connect(this, &ArchiveView::pressed, this, &ArchiveView::updateMouseButtons);
+ connect(this, &ArchiveView::clicked, this, &ArchiveView::slotClicked);
+ connect(this, &ArchiveView::doubleClicked, this, &ArchiveView::slotDoubleClicked);
}
// FIXME: this is a workaround taken from Dolphin until QTBUG-1067 is resolved
diff --git a/part/arkviewer.cpp b/part/arkviewer.cpp
index 4252510..f55258c 100644
--- a/part/arkviewer.cpp
+++ b/part/arkviewer.cpp
@@ -52,7 +52,7 @@ ArkViewer::ArkViewer(QWidget * parent, Qt::WFlags flags)
setMainWidget(m_widget);
- connect(this, SIGNAL(finished()), SLOT(dialogClosed()));
+ connect(this, &ArkViewer::finished, this, &ArkViewer::dialogClosed);
}
ArkViewer::~ArkViewer()
@@ -222,8 +222,7 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const KMimeType::P
}
if (m_part.data()->browserExtension()) {
- connect(m_part.data()->browserExtension(),
- SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
+ connect(m_part.data()->browserExtension(), SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
SLOT(slotOpenUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)));
}