summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <[email protected]>2015-09-19 10:47:56 +0100
committerSergio Martins <[email protected]>2015-09-19 10:47:56 +0100
commitb8d622be1ffef051af6006a7b242c3213b263393 (patch)
tree16e2f2b28e99d6699e7a1882a529a26174eb3ad6
parentac3b6d053b022f52cecbe9539780aa28066c0a7b (diff)
console: Port to Qt5 connect syntax, which is faster
-rw-r--r--console/calendarjanitor/calendarjanitor.cpp2
-rw-r--r--console/konsolekalendar/konsolekalendaradd.cpp4
-rw-r--r--console/konsolekalendar/konsolekalendarchange.cpp4
-rw-r--r--console/konsolekalendar/konsolekalendardelete.cpp2
-rw-r--r--console/konsolekalendar/main.cpp2
-rw-r--r--libkdepim/src/addressline/addresslineedit/addresseelineedit_p.cpp32
-rw-r--r--libkdepim/src/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp2
-rw-r--r--libkdepim/src/addressline/completionorder/completionorderwidget.cpp4
-rw-r--r--libkdepim/src/ldap/ldapsearchdialog.cpp2
-rw-r--r--libkdepim/src/multiplyingline/multiplyinglineeditor.cpp4
-rw-r--r--libkdepim/src/multiplyingline/multiplyinglineview_p.cpp24
-rw-r--r--libkdepim/src/progresswidget/progressdialog.cpp46
-rw-r--r--libkdepim/src/progresswidget/progressmanager.cpp32
-rw-r--r--libkdepim/src/progresswidget/statusbarprogresswidget.cpp28
-rw-r--r--pimcommon/src/shorturl/engine/googleshorturl.cpp2
-rw-r--r--pimcommon/src/storageservice/dialog/storageservicedeletedialog.cpp4
-rw-r--r--pimcommon/src/storageservice/storageserviceabstract.cpp2
-rw-r--r--pimcommon/src/storageservice/webdav/webdavjob.cpp4
-rw-r--r--pimcommon/src/storageservice/widgets/storageservicetreewidget.cpp4
-rw-r--r--pimcommon/src/temporaryfile/attachmenttemporaryfilesdirs.cpp2
20 files changed, 103 insertions, 103 deletions
diff --git a/console/calendarjanitor/calendarjanitor.cpp b/console/calendarjanitor/calendarjanitor.cpp
index d33a1e0..537bb34 100644
--- a/console/calendarjanitor/calendarjanitor.cpp
+++ b/console/calendarjanitor/calendarjanitor.cpp
@@ -120,7 +120,7 @@ void CalendarJanitor::onCollectionsFetched(bool success)
// Load all items:
m_calendar = Akonadi::FetchJobCalendar::Ptr(new Akonadi::FetchJobCalendar());
- connect(m_calendar.data(), SIGNAL(loadFinished(bool,QString)), SLOT(onItemsFetched(bool,QString)));
+ connect(m_calendar.data(), &Akonadi::FetchJobCalendar::loadFinished, this, &CalendarJanitor::onItemsFetched);
}
void CalendarJanitor::onItemsFetched(bool success, const QString &errorMessage)
diff --git a/console/konsolekalendar/konsolekalendaradd.cpp b/console/konsolekalendar/konsolekalendaradd.cpp
index 62c8890..9e5ab7c 100644
--- a/console/konsolekalendar/konsolekalendaradd.cpp
+++ b/console/konsolekalendar/konsolekalendaradd.cpp
@@ -97,8 +97,8 @@ bool KonsoleKalendarAdd::addEvent()
Akonadi::CalendarBase::Ptr calendar = m_variables->getCalendar();
QEventLoop loop;
- QObject::connect(calendar.data(), SIGNAL(createFinished(bool,QString)),
- &loop, SLOT(quit()));
+ QObject::connect(calendar.data(), &Akonadi::CalendarBase::createFinished,
+ &loop, &QEventLoop::quit);
QElapsedTimer t;
t.start();
Q_ASSERT(calendar->incidence(event->uid()) == 0); // can't exist yet
diff --git a/console/konsolekalendar/konsolekalendarchange.cpp b/console/konsolekalendar/konsolekalendarchange.cpp
index 96c615f..04cc074 100644
--- a/console/konsolekalendar/konsolekalendarchange.cpp
+++ b/console/konsolekalendar/konsolekalendarchange.cpp
@@ -112,8 +112,8 @@ bool KonsoleKalendarChange::changeEvent()
}
event->endUpdates();
QEventLoop loop;
- QObject::connect(calendar.data(), SIGNAL(modifyFinished(bool,QString)),
- &loop, SLOT(quit()));
+ QObject::connect(calendar.data(), &Akonadi::CalendarBase::modifyFinished,
+ &loop, &QEventLoop::quit);
QElapsedTimer t;
t.start();
calendar->modifyIncidence(event);
diff --git a/console/konsolekalendar/konsolekalendardelete.cpp b/console/konsolekalendar/konsolekalendardelete.cpp
index d4207c7..ab910e8 100644
--- a/console/konsolekalendar/konsolekalendardelete.cpp
+++ b/console/konsolekalendar/konsolekalendardelete.cpp
@@ -78,7 +78,7 @@ bool KonsoleKalendarDelete::deleteEvent()
QEventLoop loop;
Akonadi::CalendarBase::Ptr calendar = m_variables->getCalendar();
- QObject::connect(calendar.data(), SIGNAL(deleteFinished(bool,QString)), &loop, SLOT(quit()));
+ QObject::connect(calendar.data(), &Akonadi::CalendarBase::deleteFinished, &loop, &QEventLoop::quit);
calendar->deleteEvent(event);
loop.exec();
qCDebug(KONSOLEKALENDAR_LOG) << "Finished deleting";
diff --git a/console/konsolekalendar/main.cpp b/console/konsolekalendar/main.cpp
index 9e958d5..c023b40 100644
--- a/console/konsolekalendar/main.cpp
+++ b/console/konsolekalendar/main.cpp
@@ -633,7 +633,7 @@ int main(int argc, char *argv[])
QEventLoop loop;
Akonadi::FetchJobCalendar::Ptr calendar = Akonadi::FetchJobCalendar::Ptr(new Akonadi::FetchJobCalendar());
- QObject::connect(calendar.data(), SIGNAL(loadFinished(bool,QString)), &loop, SLOT(quit()));
+ QObject::connect(calendar.data(), &Akonadi::FetchJobCalendar::loadFinished, &loop, &QEventLoop::quit);
qCDebug(KONSOLEKALENDAR_LOG) << "Starting to load calendar";
QElapsedTimer t;
t.start();
diff --git a/libkdepim/src/addressline/addresslineedit/addresseelineedit_p.cpp b/libkdepim/src/addressline/addresslineedit/addresseelineedit_p.cpp
index 2d954b5..6160642 100644
--- a/libkdepim/src/addressline/addresslineedit/addresseelineedit_p.cpp
+++ b/libkdepim/src/addressline/addresslineedit/addresseelineedit_p.cpp
@@ -65,7 +65,7 @@ AddresseeLineEditPrivate::AddresseeLineEditPrivate(KPIM::AddresseeLineEdit *qq,
}
m_delayedQueryTimer.setSingleShot(true);
- connect(&m_delayedQueryTimer, SIGNAL(timeout()), this, SLOT(slotTriggerDelayedQueries()));
+ connect(&m_delayedQueryTimer, &QTimer::timeout, this, &AddresseeLineEditPrivate::slotTriggerDelayedQueries);
}
@@ -148,17 +148,17 @@ void AddresseeLineEditPrivate::init()
s_static->updateLDAPWeights();
if (!m_completionInitialized) {
q->setCompletionObject(s_static->completion, false);
- connect(q, SIGNAL(completion(QString)),
- this, SLOT(slotCompletion()));
+ connect(q, &KLineEdit::completion,
+ this, &AddresseeLineEditPrivate::slotCompletion);
connect(q, SIGNAL(returnPressed(QString)),
this, SLOT(slotReturnPressed(QString)));
KCompletionBox *box = q->completionBox();
connect(box, SIGNAL(activated(QString)),
this, SLOT(slotPopupCompletion(QString)));
- connect(box, SIGNAL(userCancelled(QString)),
- this, SLOT(slotUserCancelled(QString)));
- connect(s_static->ldapTimer, SIGNAL(timeout()), SLOT(slotStartLDAPLookup()));
+ connect(box, &KCompletionBox::userCancelled,
+ this, &AddresseeLineEditPrivate::slotUserCancelled);
+ connect(s_static->ldapTimer, &QTimer::timeout, this, &AddresseeLineEditPrivate::slotStartLDAPLookup);
connect(s_static->ldapSearch, SIGNAL(searchData(KLDAP::LdapResult::List)),
SLOT(slotLDAPSearchData(KLDAP::LdapResult::List)));
@@ -481,19 +481,19 @@ void AddresseeLineEditPrivate::akonadiPerformSearch()
contactJob->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
contactJob->setQuery(Akonadi::ContactSearchJob::NameOrEmail, m_searchString,
Akonadi::ContactSearchJob::ContainsWordBoundaryMatch);
- connect(contactJob, SIGNAL(itemsReceived(Akonadi::Item::List)),
- this, SLOT(slotAkonadiHandleItems(Akonadi::Item::List)));
- connect(contactJob, SIGNAL(result(KJob*)),
- this, SLOT(slotAkonadiSearchResult(KJob*)));
+ connect(contactJob, &Akonadi::ItemSearchJob::itemsReceived,
+ this, &AddresseeLineEditPrivate::slotAkonadiHandleItems);
+ connect(contactJob, &KJob::result,
+ this, &AddresseeLineEditPrivate::slotAkonadiSearchResult);
Akonadi::ContactGroupSearchJob *groupJob = new Akonadi::ContactGroupSearchJob(s_static->akonadiSession);
groupJob->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
groupJob->setQuery(Akonadi::ContactGroupSearchJob::Name, m_searchString,
Akonadi::ContactGroupSearchJob::ContainsMatch);
- connect(contactJob, SIGNAL(itemsReceived(Akonadi::Item::List)),
- this, SLOT(slotAkonadiHandleItems(Akonadi::Item::List)));
- connect(groupJob, SIGNAL(result(KJob*)),
- this, SLOT(slotAkonadiSearchResult(KJob*)));
+ connect(contactJob, &Akonadi::ItemSearchJob::itemsReceived,
+ this, &AddresseeLineEditPrivate::slotAkonadiHandleItems);
+ connect(groupJob, &KJob::result,
+ this, &AddresseeLineEditPrivate::slotAkonadiSearchResult);
s_static->akonadiJobsInFlight.append(contactJob);
s_static->akonadiJobsInFlight.append(groupJob);
@@ -768,8 +768,8 @@ void AddresseeLineEditPrivate::slotAkonadiHandleItems(const Akonadi::Item::List
new Akonadi::CollectionFetchJob(item.parentCollection(),
Akonadi::CollectionFetchJob::Base,
s_static->akonadiSession);
- connect(collectionJob, SIGNAL(collectionsReceived(Akonadi::Collection::List)),
- this, SLOT(slotAkonadiCollectionsReceived(Akonadi::Collection::List)));
+ connect(collectionJob, &Akonadi::CollectionFetchJob::collectionsReceived,
+ this, &AddresseeLineEditPrivate::slotAkonadiCollectionsReceived);
/* we don't want to start multiple fetch jobs for the same collection,
so insert the collection with an index value of -2 */
AddresseeLineEditStatic::collectionInfo info;
diff --git a/libkdepim/src/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp b/libkdepim/src/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp
index 0396194..6cdb72d 100644
--- a/libkdepim/src/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp
+++ b/libkdepim/src/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp
@@ -104,7 +104,7 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
selectElementLayout->addWidget(mMoreResult);
mMoreResult->setContextMenuPolicy(Qt::NoContextMenu);
- connect(mMoreResult, SIGNAL(linkActivated(QString)), SLOT(slotLinkClicked(QString)));
+ connect(mMoreResult, &QLabel::linkActivated, this, &BlackListBalooEmailCompletionWidget::slotLinkClicked);
mMoreResult->setVisible(false);
selectElementLayout->addStretch(1);
diff --git a/libkdepim/src/addressline/completionorder/completionorderwidget.cpp b/libkdepim/src/addressline/completionorder/completionorderwidget.cpp
index 22fb439..9ce8a4c 100644
--- a/libkdepim/src/addressline/completionorder/completionorderwidget.cpp
+++ b/libkdepim/src/addressline/completionorder/completionorderwidget.cpp
@@ -363,8 +363,8 @@ void CompletionOrderWidget::loadCompletionItems()
mCollectionModel = mimeTypeProxy;
- connect(mimeTypeProxy, SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(rowsInserted(QModelIndex,int,int)));
+ connect(mimeTypeProxy, &QAbstractItemModel::rowsInserted,
+ this, &CompletionOrderWidget::rowsInserted);
for (int row = 0; row < mCollectionModel->rowCount(); ++row) {
addCompletionItemForCollection(mCollectionModel->index(row, 0));
diff --git a/libkdepim/src/ldap/ldapsearchdialog.cpp b/libkdepim/src/ldap/ldapsearchdialog.cpp
index c537d62..ffa580a 100644
--- a/libkdepim/src/ldap/ldapsearchdialog.cpp
+++ b/libkdepim/src/ldap/ldapsearchdialog.cpp
@@ -625,7 +625,7 @@ LdapSearchDialog::LdapSearchDialog(QWidget *parent)
d->sortproxy->setFilterKeyColumn(-1); //Search in all column
d->sortproxy->setSourceModel(d->mModel);
d->sortproxy->setFilterCaseSensitivity(Qt::CaseInsensitive);
- connect(d->searchLine, SIGNAL(textChanged(QString)), d->sortproxy, SLOT(setFilterFixedString(QString)));
+ connect(d->searchLine, &QLineEdit::textChanged, d->sortproxy, &QSortFilterProxyModel::setFilterFixedString);
d->mResultView->setModel(d->sortproxy);
d->mResultView->verticalHeader()->hide();
diff --git a/libkdepim/src/multiplyingline/multiplyinglineeditor.cpp b/libkdepim/src/multiplyingline/multiplyinglineeditor.cpp
index 21dc4b6..3d48b3c 100644
--- a/libkdepim/src/multiplyingline/multiplyinglineeditor.cpp
+++ b/libkdepim/src/multiplyingline/multiplyinglineeditor.cpp
@@ -40,8 +40,8 @@ MultiplyingLineEditor::MultiplyingLineEditor(MultiplyingLineFactory *factory, QW
topLayout->addWidget(mView);
connect(mView, &MultiplyingLineView::focusUp, this, &MultiplyingLineEditor::focusUp);
connect(mView, &MultiplyingLineView::focusDown, this, &MultiplyingLineEditor::focusDown);
- connect(mView, SIGNAL(completionModeChanged(KCompletion::CompletionMode)),
- SIGNAL(completionModeChanged(KCompletion::CompletionMode)));
+ connect(mView, &MultiplyingLineView::completionModeChanged,
+ this, &MultiplyingLineEditor::completionModeChanged);
connect(mView, &MultiplyingLineView::lineDeleted, this, &MultiplyingLineEditor::lineDeleted);
connect(mView, &MultiplyingLineView::lineAdded, this, &MultiplyingLineEditor::lineAdded);
connect(mView, &MultiplyingLineView::sizeHintChanged,
diff --git a/libkdepim/src/multiplyingline/multiplyinglineview_p.cpp b/libkdepim/src/multiplyingline/multiplyinglineview_p.cpp
index 226e57e..1a311fc 100644
--- a/libkdepim/src/multiplyingline/multiplyinglineview_p.cpp
+++ b/libkdepim/src/multiplyingline/multiplyinglineview_p.cpp
@@ -82,17 +82,17 @@ MultiplyingLine *MultiplyingLineView::addLine()
mTopLayout->addWidget(line);
line->setCompletionMode(mCompletionMode);
line->show();
- connect(line, SIGNAL(returnPressed(KPIM::MultiplyingLine*)),
- SLOT(slotReturnPressed(KPIM::MultiplyingLine*)));
- connect(line, SIGNAL(upPressed(KPIM::MultiplyingLine*)),
- SLOT(slotUpPressed(KPIM::MultiplyingLine*)));
- connect(line, SIGNAL(downPressed(KPIM::MultiplyingLine*)),
- SLOT(slotDownPressed(KPIM::MultiplyingLine*)));
+ connect(line, &MultiplyingLine::returnPressed,
+ this, &MultiplyingLineView::slotReturnPressed);
+ connect(line, &MultiplyingLine::upPressed,
+ this, &MultiplyingLineView::slotUpPressed);
+ connect(line, &MultiplyingLine::downPressed,
+ this, &MultiplyingLineView::slotDownPressed);
connect(line, &MultiplyingLine::rightPressed, this, &MultiplyingLineView::focusRight);
- connect(line, SIGNAL(deleteLine(KPIM::MultiplyingLine*)),
- SLOT(slotDecideLineDeletion(KPIM::MultiplyingLine*)));
- connect(line, SIGNAL(completionModeChanged(KCompletion::CompletionMode)),
- SLOT(setCompletionMode(KCompletion::CompletionMode)));
+ connect(line, &MultiplyingLine::deleteLine,
+ this, &MultiplyingLineView::slotDecideLineDeletion);
+ connect(line, &MultiplyingLine::completionModeChanged,
+ this, &MultiplyingLineView::setCompletionMode);
if (!mLines.isEmpty()) {
line->fixTabOrder(mLines.last()->tabOut());
@@ -104,7 +104,7 @@ MultiplyingLine *MultiplyingLineView::addLine()
resizeView();
ensureVisible(0, mLines.count() * mLineHeight, 0, 0);
- QTimer::singleShot(0, this, SLOT(moveScrollBarToEnd()));
+ QTimer::singleShot(0, this, &MultiplyingLineView::moveScrollBarToEnd);
Q_EMIT lineAdded(line);
return line;
@@ -213,7 +213,7 @@ void MultiplyingLineView::resizeView()
parentWidget()->layout()->activate();
Q_EMIT sizeHintChanged();
- QTimer::singleShot(0, this, SLOT(moveCompletionPopup()));
+ QTimer::singleShot(0, this, &MultiplyingLineView::moveCompletionPopup);
}
void MultiplyingLineView::activateLine(MultiplyingLine *line)
diff --git a/libkdepim/src/progresswidget/progressdialog.cpp b/libkdepim/src/progresswidget/progressdialog.cpp
index b5691c8..d758826 100644
--- a/libkdepim/src/progresswidget/progressdialog.cpp
+++ b/libkdepim/src/progresswidget/progressdialog.cpp
@@ -174,8 +174,8 @@ TransactionItem::TransactionItem(QWidget *parent,
mCancelButton = new QPushButton(QIcon::fromTheme(QStringLiteral("dialog-cancel")), QString(), h);
hHBoxLayout->addWidget(mCancelButton);
mCancelButton->setToolTip(i18n("Cancel this operation."));
- connect(mCancelButton, SIGNAL(clicked()),
- this, SLOT(slotItemCanceled()));
+ connect(mCancelButton, &QAbstractButton::clicked,
+ this, &TransactionItem::slotItemCanceled);
h->layout()->addWidget(mCancelButton);
}
@@ -276,22 +276,22 @@ ProgressDialog::ProgressDialog(QWidget *alignWidget, QWidget *parent)
* appearing and vanishing items.
*/
ProgressManager *pm = ProgressManager::instance();
- connect(pm, SIGNAL(progressItemAdded(KPIM::ProgressItem*)),
- this, SLOT(slotTransactionAdded(KPIM::ProgressItem*)));
- connect(pm, SIGNAL(progressItemCompleted(KPIM::ProgressItem*)),
- this, SLOT(slotTransactionCompleted(KPIM::ProgressItem*)));
- connect(pm, SIGNAL(progressItemProgress(KPIM::ProgressItem*,uint)),
- this, SLOT(slotTransactionProgress(KPIM::ProgressItem*,uint)));
- connect(pm, SIGNAL(progressItemStatus(KPIM::ProgressItem*,QString)),
- this, SLOT(slotTransactionStatus(KPIM::ProgressItem*,QString)));
- connect(pm, SIGNAL(progressItemLabel(KPIM::ProgressItem*,QString)),
- this, SLOT(slotTransactionLabel(KPIM::ProgressItem*,QString)));
- connect(pm, SIGNAL(progressItemCryptoStatus(KPIM::ProgressItem*,KPIM::ProgressItem::CryptoStatus)),
- this, SLOT(slotTransactionCryptoStatus(KPIM::ProgressItem*,KPIM::ProgressItem::CryptoStatus)));
- connect(pm, SIGNAL(progressItemUsesBusyIndicator(KPIM::ProgressItem*,bool)),
- this, SLOT(slotTransactionUsesBusyIndicator(KPIM::ProgressItem*,bool)));
- connect(pm, SIGNAL(showProgressDialog()),
- this, SLOT(slotShow()));
+ connect(pm, &ProgressManager::progressItemAdded,
+ this, &ProgressDialog::slotTransactionAdded);
+ connect(pm, &ProgressManager::progressItemCompleted,
+ this, &ProgressDialog::slotTransactionCompleted);
+ connect(pm, &ProgressManager::progressItemProgress,
+ this, &ProgressDialog::slotTransactionProgress);
+ connect(pm, &ProgressManager::progressItemStatus,
+ this, &ProgressDialog::slotTransactionStatus);
+ connect(pm, &ProgressManager::progressItemLabel,
+ this, &ProgressDialog::slotTransactionLabel);
+ connect(pm, &ProgressManager::progressItemCryptoStatus,
+ this, &ProgressDialog::slotTransactionCryptoStatus);
+ connect(pm, &ProgressManager::progressItemUsesBusyIndicator,
+ this, &ProgressDialog::slotTransactionUsesBusyIndicator);
+ connect(pm, &ProgressManager::showProgressDialog,
+ this, &ProgressDialog::slotShow);
}
void ProgressDialog::closeEvent(QCloseEvent *e)
@@ -328,7 +328,7 @@ void ProgressDialog::slotTransactionAdded(ProgressItem *item)
mTransactionsToListviewItems.insert(item, ti);
}
if (first && mWasLastShown) {
- QTimer::singleShot(1000, this, SLOT(slotShow()));
+ QTimer::singleShot(1000, this, &ProgressDialog::slotShow);
}
}
}
@@ -340,14 +340,14 @@ void ProgressDialog::slotTransactionCompleted(ProgressItem *item)
TransactionItem *ti = mTransactionsToListviewItems[ item ];
mTransactionsToListviewItems.remove(item);
ti->setItemComplete();
- QTimer::singleShot(3000, ti, SLOT(deleteLater()));
+ QTimer::singleShot(3000, ti, &QObject::deleteLater);
// see the slot for comments as to why that works
- connect(ti, SIGNAL(destroyed()),
- mScrollView, SLOT(slotLayoutFirstItem()));
+ connect(ti, &QObject::destroyed,
+ mScrollView, &TransactionItemView::slotLayoutFirstItem);
}
// This was the last item, hide.
if (mTransactionsToListviewItems.empty()) {
- QTimer::singleShot(3000, this, SLOT(slotHide()));
+ QTimer::singleShot(3000, this, &ProgressDialog::slotHide);
}
}
diff --git a/libkdepim/src/progresswidget/progressmanager.cpp b/libkdepim/src/progresswidget/progressmanager.cpp
index 532ff7d..5308939 100644
--- a/libkdepim/src/progresswidget/progressmanager.cpp
+++ b/libkdepim/src/progresswidget/progressmanager.cpp
@@ -304,22 +304,22 @@ ProgressItem *ProgressManager::createProgressItemImpl(ProgressItem *parent,
}
}
// connect all signals
- connect(t, SIGNAL(progressItemCompleted(KPIM::ProgressItem*)),
- this, SLOT(slotTransactionCompleted(KPIM::ProgressItem*)));
- connect(t, SIGNAL(progressItemProgress(KPIM::ProgressItem*,uint)),
- this, SIGNAL(progressItemProgress(KPIM::ProgressItem*,uint)));
- connect(t, SIGNAL(progressItemAdded(KPIM::ProgressItem*)),
- this, SIGNAL(progressItemAdded(KPIM::ProgressItem*)));
- connect(t, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),
- this, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)));
- connect(t, SIGNAL(progressItemStatus(KPIM::ProgressItem*,QString)),
- this, SIGNAL(progressItemStatus(KPIM::ProgressItem*,QString)));
- connect(t, SIGNAL(progressItemLabel(KPIM::ProgressItem*,QString)),
- this, SIGNAL(progressItemLabel(KPIM::ProgressItem*,QString)));
- connect(t, SIGNAL(progressItemCryptoStatus(KPIM::ProgressItem*,KPIM::ProgressItem::CryptoStatus)),
- this, SIGNAL(progressItemCryptoStatus(KPIM::ProgressItem*,KPIM::ProgressItem::CryptoStatus)));
- connect(t, SIGNAL(progressItemUsesBusyIndicator(KPIM::ProgressItem*,bool)),
- this, SIGNAL(progressItemUsesBusyIndicator(KPIM::ProgressItem*,bool)));
+ connect(t, &ProgressItem::progressItemCompleted,
+ this, &ProgressManager::slotTransactionCompleted);
+ connect(t, &ProgressItem::progressItemProgress,
+ this, &ProgressManager::progressItemProgress);
+ connect(t, &ProgressItem::progressItemAdded,
+ this, &ProgressManager::progressItemAdded);
+ connect(t, &ProgressItem::progressItemCanceled,
+ this, &ProgressManager::progressItemCanceled);
+ connect(t, &ProgressItem::progressItemStatus,
+ this, &ProgressManager::progressItemStatus);
+ connect(t, &ProgressItem::progressItemLabel,
+ this, &ProgressManager::progressItemLabel);
+ connect(t, &ProgressItem::progressItemCryptoStatus,
+ this, &ProgressManager::progressItemCryptoStatus);
+ connect(t, &ProgressItem::progressItemUsesBusyIndicator,
+ this, &ProgressManager::progressItemUsesBusyIndicator);
Q_EMIT progressItemAdded(t);
} else {
diff --git a/libkdepim/src/progresswidget/statusbarprogresswidget.cpp b/libkdepim/src/progresswidget/statusbarprogresswidget.cpp
index ff5fb72..419702a 100644
--- a/libkdepim/src/progresswidget/statusbarprogresswidget.cpp
+++ b/libkdepim/src/progresswidget/statusbarprogresswidget.cpp
@@ -107,15 +107,15 @@ StatusbarProgressWidget::StatusbarProgressWidget(ProgressDialog *progressDialog,
connect(m_pButton, &QAbstractButton::clicked,
progressDialog, &ProgressDialog::slotToggleVisibility);
- connect(ProgressManager::instance(), SIGNAL(progressItemAdded(KPIM::ProgressItem*)),
- this, SLOT(slotProgressItemAdded(KPIM::ProgressItem*)));
- connect(ProgressManager::instance(), SIGNAL(progressItemCompleted(KPIM::ProgressItem*)),
- this, SLOT(slotProgressItemCompleted(KPIM::ProgressItem*)));
- connect(ProgressManager::instance(), SIGNAL(progressItemUsesBusyIndicator(KPIM::ProgressItem*,bool)),
- this, SLOT(updateBusyMode(KPIM::ProgressItem*)));
+ connect(ProgressManager::instance(), &ProgressManager::progressItemAdded,
+ this, &StatusbarProgressWidget::slotProgressItemAdded);
+ connect(ProgressManager::instance(), &ProgressManager::progressItemCompleted,
+ this, &StatusbarProgressWidget::slotProgressItemCompleted);
+ connect(ProgressManager::instance(), &ProgressManager::progressItemUsesBusyIndicator,
+ this, &StatusbarProgressWidget::updateBusyMode);
- connect(progressDialog, SIGNAL(visibilityChanged(bool)),
- this, SLOT(slotProgressDialogVisible(bool)));
+ connect(progressDialog, &ProgressDialog::visibilityChanged,
+ this, &StatusbarProgressWidget::slotProgressDialogVisible);
mDelayTimer = new QTimer(this);
mDelayTimer->setSingleShot(true);
@@ -149,8 +149,8 @@ void StatusbarProgressWidget::updateBusyMode(KPIM::ProgressItem *item)
} else { // N items
if (!mBusyTimer) {
mBusyTimer = new QTimer(this);
- connect(mBusyTimer, SIGNAL(timeout()),
- this, SLOT(slotBusyIndicator()));
+ connect(mBusyTimer, &QTimer::timeout,
+ this, &StatusbarProgressWidget::slotBusyIndicator);
mDelayTimer->start(1000);
}
}
@@ -189,14 +189,14 @@ void StatusbarProgressWidget::slotProgressItemCompleted(ProgressItem *item)
void StatusbarProgressWidget::connectSingleItem()
{
if (mCurrentItem) {
- disconnect(mCurrentItem, SIGNAL(progressItemProgress(KPIM::ProgressItem*,uint)),
- this, SLOT(slotProgressItemProgress(KPIM::ProgressItem*,uint)));
+ disconnect(mCurrentItem, &ProgressItem::progressItemProgress,
+ this, &StatusbarProgressWidget::slotProgressItemProgress);
mCurrentItem = Q_NULLPTR;
}
mCurrentItem = ProgressManager::instance()->singleItem();
if (mCurrentItem) {
- connect(mCurrentItem, SIGNAL(progressItemProgress(KPIM::ProgressItem*,uint)),
- this, SLOT(slotProgressItemProgress(KPIM::ProgressItem*,uint)));
+ connect(mCurrentItem, &ProgressItem::progressItemProgress,
+ this, &StatusbarProgressWidget::slotProgressItemProgress);
}
}
diff --git a/pimcommon/src/shorturl/engine/googleshorturl.cpp b/pimcommon/src/shorturl/engine/googleshorturl.cpp
index fc97be1..888adfc 100644
--- a/pimcommon/src/shorturl/engine/googleshorturl.cpp
+++ b/pimcommon/src/shorturl/engine/googleshorturl.cpp
@@ -26,7 +26,7 @@ using namespace PimCommon;
GoogleShortUrl::GoogleShortUrl(QObject *parent)
: PimCommon::AbstractShortUrl(parent)
{
- connect(mNetworkAccessManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(slotSslErrors(QNetworkReply*,QList<QSslError>)));
+ connect(mNetworkAccessManager, &QNetworkAccessManager::sslErrors, this, &GoogleShortUrl::slotSslErrors);
}
GoogleShortUrl::~GoogleShortUrl()
diff --git a/pimcommon/src/storageservice/dialog/storageservicedeletedialog.cpp b/pimcommon/src/storageservice/dialog/storageservicedeletedialog.cpp
index 1779ac7..8862476 100644
--- a/pimcommon/src/storageservice/dialog/storageservicedeletedialog.cpp
+++ b/pimcommon/src/storageservice/dialog/storageservicedeletedialog.cpp
@@ -145,13 +145,13 @@ void StorageServiceDeleteDialog::slotRefreshList()
void StorageServiceDeleteDialog::slotDeleteFolderDone(const QString &serviceName, const QString &filename)
{
Q_EMIT deleteFolderDone(serviceName, filename);
- QTimer::singleShot(0, this, SLOT(slotRefreshList()));
+ QTimer::singleShot(0, this, &StorageServiceDeleteDialog::slotRefreshList);
}
void StorageServiceDeleteDialog::slotDeleteFileDone(const QString &serviceName, const QString &filename)
{
Q_EMIT deleteFileDone(serviceName, filename);
- QTimer::singleShot(0, this, SLOT(slotRefreshList()));
+ QTimer::singleShot(0, this, &StorageServiceDeleteDialog::slotRefreshList);
}
void StorageServiceDeleteDialog::slotActionFailed(const QString &serviceName, const QString &data)
diff --git a/pimcommon/src/storageservice/storageserviceabstract.cpp b/pimcommon/src/storageservice/storageserviceabstract.cpp
index 8012ff0..9f4cd6e 100644
--- a/pimcommon/src/storageservice/storageserviceabstract.cpp
+++ b/pimcommon/src/storageservice/storageserviceabstract.cpp
@@ -430,7 +430,7 @@ void StorageServiceAbstract::slotCopyFolderDone(const QString &filename)
void StorageServiceAbstract::emitAuthentificationDone()
{
Q_EMIT authenticationDone(storageServiceName());
- QTimer::singleShot(0, this, SLOT(slotNextAction()));
+ QTimer::singleShot(0, this, &StorageServiceAbstract::slotNextAction);
}
void StorageServiceAbstract::slotNextAction()
diff --git a/pimcommon/src/storageservice/webdav/webdavjob.cpp b/pimcommon/src/storageservice/webdav/webdavjob.cpp
index 0848138..1cebc9d 100644
--- a/pimcommon/src/storageservice/webdav/webdavjob.cpp
+++ b/pimcommon/src/storageservice/webdav/webdavjob.cpp
@@ -40,8 +40,8 @@ WebDavJob::WebDavJob(QObject *parent)
mNbAuthCheck(0)
{
mShareApi = QStringLiteral("/ocs/v1.php/apps/files_sharing/api/v1/shares");
- connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(slotSendDataFinished(QNetworkReply*)));
- connect(mNetworkAccessManager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(slotAuthenticationRequired(QNetworkReply*,QAuthenticator*)));
+ connect(mNetworkAccessManager, &QNetworkAccessManager::finished, this, &WebDavJob::slotSendDataFinished);
+ connect(mNetworkAccessManager, &QNetworkAccessManager::authenticationRequired, this, &WebDavJob::slotAuthenticationRequired);
}
WebDavJob::~WebDavJob()
diff --git a/pimcommon/src/storageservice/widgets/storageservicetreewidget.cpp b/pimcommon/src/storageservice/widgets/storageservicetreewidget.cpp
index 5a65334..87f074d 100644
--- a/pimcommon/src/storageservice/widgets/storageservicetreewidget.cpp
+++ b/pimcommon/src/storageservice/widgets/storageservicetreewidget.cpp
@@ -65,7 +65,7 @@ void StorageServiceTreeWidget::slotMoveUp()
return;
}
setCurrentFolder(parentFolder());
- QTimer::singleShot(0, this, SLOT(refreshList()));
+ QTimer::singleShot(0, this, &StorageServiceTreeWidget::refreshList);
}
void StorageServiceTreeWidget::createUpAction(QMenu *menu)
@@ -214,7 +214,7 @@ void StorageServiceTreeWidget::goToFolder(const QString &folder, bool addToHisto
Q_EMIT changeFolder(currentFolder(), parentFolder());
}
setCurrentFolder(folder);
- QTimer::singleShot(0, this, SLOT(refreshList()));
+ QTimer::singleShot(0, this, &StorageServiceTreeWidget::refreshList);
}
void StorageServiceTreeWidget::slotItemDoubleClicked(QTreeWidgetItem *item, int column)
diff --git a/pimcommon/src/temporaryfile/attachmenttemporaryfilesdirs.cpp b/pimcommon/src/temporaryfile/attachmenttemporaryfilesdirs.cpp
index 71e3372..ed7fdd4 100644
--- a/pimcommon/src/temporaryfile/attachmenttemporaryfilesdirs.cpp
+++ b/pimcommon/src/temporaryfile/attachmenttemporaryfilesdirs.cpp
@@ -57,7 +57,7 @@ void AttachmentTemporaryFilesDirs::setDelayRemoveAllInMs(int ms)
void AttachmentTemporaryFilesDirs::removeTempFiles()
{
- QTimer::singleShot(d->mDelayRemoveAll, this, SLOT(slotRemoveTempFiles()));
+ QTimer::singleShot(d->mDelayRemoveAll, this, &AttachmentTemporaryFilesDirs::slotRemoveTempFiles);
}
void AttachmentTemporaryFilesDirs::forceCleanTempFiles()