summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-04 20:32:40 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-04 20:32:40 (GMT)
commitf90bb1875c8cf693b93e8e92ef7be55856c0efe5 (patch)
tree663d9859b30b4c3e734f15826c3c1922393bf56e
parent179f6e9ac1c9b4a7902e791ad1e8d105179fe4da (diff)
use new connect api
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp7
-rw-r--r--messageviewer/src/viewer/viewer_p.h1
-rw-r--r--templateparser/src/customtemplatesmenu.cpp12
3 files changed, 13 insertions, 7 deletions
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index d3105df..6ba9bea 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -1622,7 +1622,7 @@ void ViewerPrivate::createActions()
// open URL
mUrlOpenAction = new QAction(QIcon::fromTheme(QStringLiteral("document-open")), i18n("Open URL"), this);
ac->addAction(QStringLiteral("open_url"), mUrlOpenAction);
- connect(mUrlOpenAction, SIGNAL(triggered(bool)), this, SLOT(slotUrlOpen()));
+ connect(mUrlOpenAction, &QAction::triggered, this, &ViewerPrivate::slotOpenUrl);
// use fixed font
mToggleFixFontAction = new KToggleAction(i18n("Use Fi&xed Font"), this);
@@ -1952,6 +1952,11 @@ void ViewerPrivate::update(MimeTreeParser::UpdateMode updateMode)
}
}
+void ViewerPrivate::slotOpenUrl()
+{
+ slotUrlOpen();
+}
+
void ViewerPrivate::slotUrlOpen(const QUrl &url)
{
if (!url.isEmpty()) {
diff --git a/messageviewer/src/viewer/viewer_p.h b/messageviewer/src/viewer/viewer_p.h
index a5070f8..8bed526 100644
--- a/messageviewer/src/viewer/viewer_p.h
+++ b/messageviewer/src/viewer/viewer_p.h
@@ -471,6 +471,7 @@ private Q_SLOTS:
public Q_SLOTS:
/** An URL has been activate with a click. */
void slotUrlOpen(const QUrl &url = QUrl());
+ void slotOpenUrl();
/** The mouse has moved on or off an URL. */
void slotUrlOn(const QString &link);
diff --git a/templateparser/src/customtemplatesmenu.cpp b/templateparser/src/customtemplatesmenu.cpp
index 9f7f5a5..b6838ea 100644
--- a/templateparser/src/customtemplatesmenu.cpp
+++ b/templateparser/src/customtemplatesmenu.cpp
@@ -88,16 +88,16 @@ CustomTemplatesMenu::CustomTemplatesMenu(QWidget *owner, KActionCollection *ac)
d->mOwnerActionCollection->addAction(QStringLiteral("custom_reply_all"), d->mCustomReplyAllActionMenu);
d->mCustomForwardMapper = new QSignalMapper(this);
- connect(d->mCustomForwardMapper, SIGNAL(mapped(int)),
- this, SLOT(slotForwardSelected(int)));
+ connect(d->mCustomForwardMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
+ this, &CustomTemplatesMenu::slotForwardSelected);
d->mCustomReplyMapper = new QSignalMapper(this);
- connect(d->mCustomReplyMapper, SIGNAL(mapped(int)),
- this, SLOT(slotReplySelected(int)));
+ connect(d->mCustomReplyMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
+ this, &CustomTemplatesMenu::slotReplySelected);
d->mCustomReplyAllMapper = new QSignalMapper(this);
- connect(d->mCustomReplyAllMapper, SIGNAL(mapped(int)),
- this, SLOT(slotReplyAllSelected(int)));
+ connect(d->mCustomReplyAllMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
+ this, &CustomTemplatesMenu::slotReplyAllSelected);
update();
}