Commit f794874c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly\n\nNO_CHANGELOG

parent 89e06e74
......@@ -111,7 +111,7 @@ include_directories(${knotes_SOURCE_DIR} ${knotes_BINARY_DIR})
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DQT_NO_FOREACH)
set(CMAKE_CXX_STANDARD 14)
configure_file(knotes-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/knotes-version.h @ONLY)
......
......@@ -99,7 +99,7 @@ NoteAlarmDialog::NoteAlarmDialog(const QString &caption, QWidget *parent)
layout->addWidget(at);
d->m_buttons->addButton(label_at, 1);
connect(d->m_buttons, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &NoteAlarmDialog::slotButtonChanged);
connect(d->m_buttons, qOverload<int>(&QButtonGroup::buttonClicked), this, &NoteAlarmDialog::slotButtonChanged);
connect(okButton, &QPushButton::clicked, this, &NoteAlarmDialog::accept);
d->m_buttons->button(0)->setChecked(true);
slotButtonChanged(d->m_buttons->checkedId());
......
......@@ -92,7 +92,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, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &NotesNetworkReceiver::slotError);
connect(d->m_sock, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), this, &NotesNetworkReceiver::slotError);
// Setup the timer
d->m_timer = new QTimer(this);
......
......@@ -49,7 +49,7 @@ NotesNetworkSender::NotesNetworkSender(QTcpSocket *socket)
QObject::connect(m_socket, &QTcpSocket::connected,
this, &NotesNetworkSender::slotConnected);
QObject::connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error),
QObject::connect(m_socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error),
this, &NotesNetworkSender::slotError);
QObject::connect(m_socket, &QTcpSocket::disconnected,
......
......@@ -232,7 +232,7 @@ KNotesApp::KNotesApp(QWidget *parent)
connect(mNoteRecorder->changeRecorder(), &Akonadi::Monitor::itemRemoved,
this, &KNotesApp::slotItemRemoved);
connect(mNoteRecorder->changeRecorder(), QOverload<const Akonadi::Collection &, const QSet<QByteArray> &>::of(&Akonadi::ChangeRecorder::collectionChanged),
connect(mNoteRecorder->changeRecorder(), qOverload<const Akonadi::Collection &, const QSet<QByteArray> &>(&Akonadi::ChangeRecorder::collectionChanged),
this, &KNotesApp::slotCollectionChanged);
connect(qApp, &QGuiApplication::commitDataRequest,
......@@ -580,7 +580,7 @@ void KNotesApp::slotPreferences()
{
// create a new preferences dialog...
KNoteConfigDialog *dialog = new KNoteConfigDialog(i18n("Settings"), this);
connect(dialog, QOverload<>::of(&KCMultiDialog::configCommitted), this, &KNotesApp::slotConfigUpdated);
connect(dialog, qOverload<>(&KCMultiDialog::configCommitted), this, &KNotesApp::slotConfigUpdated);
dialog->show();
}
......
......@@ -210,7 +210,7 @@ KNoteMiscConfig::KNoteMiscConfig(QWidget *parent)
howItWorks->setContextMenuPolicy(Qt::NoContextMenu);
lay->addStretch();
load();
connect(mDefaultTitle, &QLineEdit::textChanged, this, QOverload<>::of(&KNoteMiscConfig::changed));
connect(mDefaultTitle, &QLineEdit::textChanged, this, qOverload<>(&KNoteMiscConfig::changed));
}
void KNoteMiscConfig::load()
......@@ -263,7 +263,7 @@ KNotePrintConfig::KNotePrintConfig(QWidget *parent)
layout->addWidget(label_PrintAction, 0, 0);
mSelectTheme = new KNotePrintSelectThemeComboBox(this);
connect(mSelectTheme, QOverload<int>::of(&QComboBox::activated), this, &KNotePrintConfig::slotThemeChanged);
connect(mSelectTheme, qOverload<int>(&QComboBox::activated), this, &KNotePrintConfig::slotThemeChanged);
label_PrintAction->setBuddy(mSelectTheme);
layout->addWidget(mSelectTheme, 0, 1);
if (KAuthorized::authorize(QStringLiteral("ghns"))) {
......@@ -317,7 +317,7 @@ KNoteCollectionConfig::KNoteCollectionConfig(QWidget *parent)
QHBoxLayout *lay = new QHBoxLayout(this);
mCollectionConfigWidget = new KNoteCollectionConfigWidget;
lay->addWidget(mCollectionConfigWidget);
connect(mCollectionConfigWidget, &KNoteCollectionConfigWidget::emitChanged, this, QOverload<>::of(&KNoteCollectionConfig::changed));
connect(mCollectionConfigWidget, &KNoteCollectionConfigWidget::emitChanged, this, qOverload<>(&KNoteCollectionConfig::changed));
load();
}
......
......@@ -146,7 +146,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, QOverload<const QString &>::of(&KFontAction::triggered), this, &KNoteEdit::setFontFamily);
connect(m_textFont, qOverload<const QString &>(&KFontAction::triggered), this, &KNoteEdit::setFontFamily);
m_textSize = new KFontSizeAction(i18n("Text Size"), this);
actions->addAction(QStringLiteral("format_size"), m_textSize);
......
......@@ -220,7 +220,7 @@ KNotesPart::KNotesPart(QObject *parent)
connect(mNoteRecorder->changeRecorder(), &Akonadi::Monitor::itemRemoved,
this, &KNotesPart::slotItemRemoved);
connect(mNoteRecorder->changeRecorder(), QOverload<const Akonadi::Collection &, const QSet<QByteArray> &>::of(&Akonadi::ChangeRecorder::collectionChanged),
connect(mNoteRecorder->changeRecorder(), qOverload<const Akonadi::Collection &, const QSet<QByteArray> &>(&Akonadi::ChangeRecorder::collectionChanged),
this, &KNotesPart::slotCollectionChanged);
mSelectionModel = new QItemSelectionModel(mNoteTreeModel);
......@@ -242,7 +242,7 @@ KNotesPart::KNotesPart(QObject *parent)
connect(mQuickSearchAction, &QAction::triggered, mNotesWidget, &KNotesWidget::slotFocusQuickSearch);
connect(mNotesWidget->notesView(), &QListWidget::itemDoubleClicked,
this, QOverload<QListWidgetItem *>::of(&KNotesPart::editNote));
this, qOverload<QListWidgetItem *>(&KNotesPart::editNote));
connect(mNotesWidget->notesView(), &QListWidget::itemSelectionChanged,
this, &KNotesPart::slotOnCurrentChanged);
......@@ -635,7 +635,7 @@ void KNotesPart::slotPreferences()
{
// create a new preferences dialog...
KNoteConfigDialog *dialog = new KNoteConfigDialog(i18n("Settings"), widget());
connect(dialog, QOverload<>::of(&KCMultiDialog::configCommitted), this, &KNotesPart::slotConfigUpdated);
connect(dialog, qOverload<>(&KCMultiDialog::configCommitted), this, &KNotesPart::slotConfigUpdated);
dialog->show();
}
......
......@@ -189,10 +189,10 @@ void KNotesSummaryWidget::createNote(const Akonadi::Item &item, int counter)
urlLabel->installEventFilter(this);
urlLabel->setAlignment(Qt::AlignLeft);
urlLabel->setWordWrap(true);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::leftClickedUrl),
connect(urlLabel, qOverload<const QString &>(&KUrlLabel::leftClickedUrl),
this, &KNotesSummaryWidget::slotSelectNote);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::rightClickedUrl),
connect(urlLabel, qOverload<const QString &>(&KUrlLabel::rightClickedUrl),
this, &KNotesSummaryWidget::slotPopupMenu);
mLayout->addWidget(urlLabel, counter, 1);
......
......@@ -742,7 +742,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, QOverload<QAction *>::of(&KSelectAction::triggered),
connect(m_toDesktop, qOverload<QAction *>(&KSelectAction::triggered),
this, &KNote::slotPopupActionToDesktop);
connect(m_toDesktop->menu(), &QMenu::aboutToShow,
this, &KNote::slotUpdateDesktopActions);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment