aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-12-11 07:41:25 +0100
committerMontel Laurent <[email protected]>2017-12-11 07:41:25 +0100
commitdea8850e94274ef5e780e28cbbc946ac26b8c108 (patch)
tree1b52077745c7478a25be60b687ca3c27d7eecb18
parenta90bf634abaa3729aa026d61592f2d9016c5b21c (diff)
Port more code to new connect api
-rw-r--r--src/core/jobs/specialcollectionshelperjobs_p.h1
-rw-r--r--src/core/models/favoritecollectionsmodel.cpp4
-rw-r--r--src/core/models/favoritecollectionsmodel.h2
-rw-r--r--src/widgets/itemview.cpp2
-rw-r--r--src/xml/xmlwritejob.h3
5 files changed, 3 insertions, 9 deletions
diff --git a/src/core/jobs/specialcollectionshelperjobs_p.h b/src/core/jobs/specialcollectionshelperjobs_p.h
index 7f167db..80b79d6 100644
--- a/src/core/jobs/specialcollectionshelperjobs_p.h
+++ b/src/core/jobs/specialcollectionshelperjobs_p.h
@@ -209,7 +209,6 @@ private:
Q_PRIVATE_SLOT(d, void doStart())
Q_PRIVATE_SLOT(d, void serviceOwnerChanged(QString, QString, QString))
- Q_PRIVATE_SLOT(d, void timeout())
};
// ===================== helper functions ============================
diff --git a/src/core/models/favoritecollectionsmodel.cpp b/src/core/models/favoritecollectionsmodel.cpp
index c009466..3151249 100644
--- a/src/core/models/favoritecollectionsmodel.cpp
+++ b/src/core/models/favoritecollectionsmodel.cpp
@@ -277,8 +277,8 @@ FavoriteCollectionsModel::FavoriteCollectionsModel(QAbstractItemModel *source, c
d->loadConfig();
//React to various changes in the source model
- connect(source, SIGNAL(modelReset()), this, SLOT(reload()));
- connect(source, SIGNAL(layoutChanged()), this, SLOT(reload()));
+ connect(source, &QAbstractItemModel::modelReset, this, [this]() { d->reload(); });
+ connect(source, &QAbstractItemModel::layoutChanged, this, [this]() { d->reload(); });
connect(source, &QAbstractItemModel::rowsInserted, this, [this](const QModelIndex &parent, int begin, int end) { d->rowsInserted(parent, begin, end); });
connect(source, &QAbstractItemModel::dataChanged, this, [this](const QModelIndex &tl, const QModelIndex &br) { d->dataChanged(tl, br); });
}
diff --git a/src/core/models/favoritecollectionsmodel.h b/src/core/models/favoritecollectionsmodel.h
index a43fc64..429efd5 100644
--- a/src/core/models/favoritecollectionsmodel.h
+++ b/src/core/models/favoritecollectionsmodel.h
@@ -155,8 +155,6 @@ private:
class Private;
Private *const d;
-
- Q_PRIVATE_SLOT(d, void reload())
//@endcond
};
diff --git a/src/widgets/itemview.cpp b/src/widgets/itemview.cpp
index 3f04ea8..8e23ef8 100644
--- a/src/widgets/itemview.cpp
+++ b/src/widgets/itemview.cpp
@@ -65,7 +65,7 @@ void ItemView::Private::init()
mParent->connect(mParent, SIGNAL(activated(QModelIndex)), mParent, SLOT(itemActivated(QModelIndex)));
mParent->connect(mParent, SIGNAL(clicked(QModelIndex)), mParent, SLOT(itemClicked(QModelIndex)));
- mParent->connect(mParent, SIGNAL(doubleClicked(QModelIndex)), mParent, SLOT(itemDoubleClicked(QModelIndex)));
+ mParent->connect(mParent, QOverload<const QModelIndex &>::of(&QAbstractItemView::doubleClicked), mParent, [this](const QModelIndex &index) { itemDoubleClicked(index); });
ControlGui::widgetNeedsAkonadi(mParent);
}
diff --git a/src/xml/xmlwritejob.h b/src/xml/xmlwritejob.h
index cd2f44b..27606ac 100644
--- a/src/xml/xmlwritejob.h
+++ b/src/xml/xmlwritejob.h
@@ -47,9 +47,6 @@ private:
friend class XmlWriteJobPrivate;
XmlWriteJobPrivate *const d;
void done();
-
- Q_PRIVATE_SLOT(d, void collectionFetchResult(KJob *))
- Q_PRIVATE_SLOT(d, void itemFetchResult(KJob *))
};
}