summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-08 22:12:38 +0200
committerMontel Laurent <[email protected]>2017-08-08 22:12:38 +0200
commit3c4f250ec5fabe9dd1668cdf56d4c646c6a1a8aa (patch)
tree11236261026d2c5f3b86f1f4c18603c97beb0e09
parent0af8b6401518bd57660d4444ca7e43add1c524df (diff)
Use QOverload
-rw-r--r--noteshared/src/alarms/notealarmdialog.cpp2
-rw-r--r--noteshared/src/network/notesnetworkreceiver.cpp2
-rw-r--r--noteshared/src/network/notesnetworksender.cpp2
-rw-r--r--src/knoteedit.cpp2
-rw-r--r--src/kontactplugin/summarywidget.cpp4
-rw-r--r--src/notes/knote.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/noteshared/src/alarms/notealarmdialog.cpp b/noteshared/src/alarms/notealarmdialog.cpp
index d72f612..4eb3a76 100644
--- a/noteshared/src/alarms/notealarmdialog.cpp
+++ b/noteshared/src/alarms/notealarmdialog.cpp
@@ -103,7 +103,7 @@ NoteAlarmDialog::NoteAlarmDialog(const QString &caption, QWidget *parent)
layout->addWidget(at);
d->m_buttons->addButton(label_at, 1);
- connect(d->m_buttons, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &NoteAlarmDialog::slotButtonChanged);
+ connect(d->m_buttons, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &NoteAlarmDialog::slotButtonChanged);
connect(okButton, &QPushButton::clicked, this, &NoteAlarmDialog::accept);
d->m_buttons->button(0)->setChecked(true);
slotButtonChanged(d->m_buttons->checkedId());
diff --git a/noteshared/src/network/notesnetworkreceiver.cpp b/noteshared/src/network/notesnetworkreceiver.cpp
index fd6561f..76a543f 100644
--- a/noteshared/src/network/notesnetworkreceiver.cpp
+++ b/noteshared/src/network/notesnetworkreceiver.cpp
@@ -93,7 +93,7 @@ NotesNetworkReceiver::NotesNetworkReceiver(QTcpSocket *s)
// Setup the communications
connect(d->m_sock, &QTcpSocket::readyRead, this, &NotesNetworkReceiver::slotDataAvailable);
connect(d->m_sock, &QTcpSocket::disconnected, this, &NotesNetworkReceiver::slotConnectionClosed);
- connect(d->m_sock, static_cast<void (QTcpSocket::*)(QAbstractSocket::SocketError)>(&QTcpSocket::error), this, &NotesNetworkReceiver::slotError);
+ connect(d->m_sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &NotesNetworkReceiver::slotError);
// Setup the timer
d->m_timer = new QTimer(this);
diff --git a/noteshared/src/network/notesnetworksender.cpp b/noteshared/src/network/notesnetworksender.cpp
index 5137e14..490c159 100644
--- a/noteshared/src/network/notesnetworksender.cpp
+++ b/noteshared/src/network/notesnetworksender.cpp
@@ -48,7 +48,7 @@ NotesNetworkSender::NotesNetworkSender(QTcpSocket *socket)
// QObject:: prefix needed, otherwise the KStreamSocket::connect()
// method is called!!!
QObject::connect(m_socket, &QTcpSocket::connected, this, &NotesNetworkSender::slotConnected);
- QObject::connect(m_socket, static_cast<void (QTcpSocket::*)(QAbstractSocket::SocketError)>(&QTcpSocket::error), this, &NotesNetworkSender::slotError);
+ QObject::connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &NotesNetworkSender::slotError);
QObject::connect(m_socket, &QTcpSocket::disconnected, this, &NotesNetworkSender::slotClosed);
QObject::connect(m_socket, &QTcpSocket::bytesWritten, this, &NotesNetworkSender::slotWritten);
}
diff --git a/src/knoteedit.cpp b/src/knoteedit.cpp
index e254a2c..327fed2 100644
--- a/src/knoteedit.cpp
+++ b/src/knoteedit.cpp
@@ -154,7 +154,7 @@ KNoteEdit::KNoteEdit(KActionCollection *actions, QWidget *parent)
m_textFont = new KFontAction(i18n("Text Font"), this);
actions->addAction(QStringLiteral("format_font"), m_textFont);
- connect(m_textFont, static_cast<void (KFontAction::*)(const QString &)>(&KFontAction::triggered), this, &KNoteEdit::setFontFamily);
+ connect(m_textFont, QOverload<const QString &>::of(&KFontAction::triggered), this, &KNoteEdit::setFontFamily);
m_textSize = new KFontSizeAction(i18n("Text Size"), this);
actions->addAction(QStringLiteral("format_size"), m_textSize);
diff --git a/src/kontactplugin/summarywidget.cpp b/src/kontactplugin/summarywidget.cpp
index 8c4e660..6aa0e49 100644
--- a/src/kontactplugin/summarywidget.cpp
+++ b/src/kontactplugin/summarywidget.cpp
@@ -191,8 +191,8 @@ void KNotesSummaryWidget::createNote(const Akonadi::Item &item, int counter)
urlLabel->installEventFilter(this);
urlLabel->setAlignment(Qt::AlignLeft);
urlLabel->setWordWrap(true);
- connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::leftClickedUrl), this, &KNotesSummaryWidget::slotSelectNote);
- connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::rightClickedUrl), this, &KNotesSummaryWidget::slotPopupMenu);
+ connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::leftClickedUrl), this, &KNotesSummaryWidget::slotSelectNote);
+ connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::rightClickedUrl), this, &KNotesSummaryWidget::slotPopupMenu);
mLayout->addWidget(urlLabel, counter, 1);
diff --git a/src/notes/knote.cpp b/src/notes/knote.cpp
index e783af7..49f17da 100644
--- a/src/notes/knote.cpp
+++ b/src/notes/knote.cpp
@@ -744,7 +744,7 @@ void KNote::createActions()
#if KDEPIM_HAVE_X11
m_toDesktop = new KSelectAction(i18n("To Desktop"), this);
actionCollection()->addAction(QStringLiteral("to_desktop"), m_toDesktop);
- connect(m_toDesktop, static_cast<void (KSelectAction::*)(QAction *)>(&KSelectAction::triggered), this, &KNote::slotPopupActionToDesktop);
+ connect(m_toDesktop, QOverload<QAction *>::of(&KSelectAction::triggered), this, &KNote::slotPopupActionToDesktop);
connect(m_toDesktop->menu(), &QMenu::aboutToShow, this, &KNote::slotUpdateDesktopActions);
// initially populate it, otherwise stays disabled
slotUpdateDesktopActions();