summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-07-08 16:06:39 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-07-08 16:06:39 (GMT)
commit69a318b08109c37c78ba2cd2a68d5b5769bd2510 (patch)
treeba85ff31d38d4895586e59ebfd5b93b1b05b6979
parent1316fea29ede941297b4b7659245ea3f437905cf (diff)
Use new slot syntax for KStandardAction connections.
-rw-r--r--CMakeLists.txt10
-rw-r--r--editor/kgpgeditor.cpp30
2 files changed, 22 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc86304..6a8c859 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,12 +23,10 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
)
# Load the frameworks we need
-find_package(KF5 REQUIRED
- AkonadiContact
+find_package(KF5 5.23 REQUIRED
Archive
DocTools
Codecs
- Contacts
CoreAddons
I18n
IconThemes
@@ -38,6 +36,12 @@ find_package(KF5 REQUIRED
WidgetsAddons
)
+# kdepimlibs
+find_package(KF5 REQUIRED
+ AkonadiContact
+ Contacts
+)
+
# only headers are used
find_package(Gpgme REQUIRED)
diff --git a/editor/kgpgeditor.cpp b/editor/kgpgeditor.cpp
index 96d5392..a8a0926 100644
--- a/editor/kgpgeditor.cpp
+++ b/editor/kgpgeditor.cpp
@@ -160,24 +160,24 @@ void KgpgEditor::saveOptions()
void KgpgEditor::initActions()
{
- KStandardAction::openNew(this, SLOT(slotFileNew()), actionCollection());
- KStandardAction::open(this, SLOT(slotFileOpen()), actionCollection());
- KStandardAction::save(this, SLOT(slotFileSave()), actionCollection());
- KStandardAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- KStandardAction::close(this, SLOT(slotFileClose()), actionCollection());
- KStandardAction::paste(this, SLOT(slotEditPaste()), actionCollection());
- KStandardAction::print(this, SLOT(slotFilePrint()), actionCollection());
- KStandardAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
- KStandardAction::find(this, SLOT(slotFind()), actionCollection());
- KStandardAction::findNext(this, SLOT(slotFindNext()), actionCollection());
- KStandardAction::findPrev(this, SLOT(slotFindPrev()), actionCollection());
+ KStandardAction::openNew(this, &KgpgEditor::slotFileNew, actionCollection());
+ KStandardAction::open(this, &KgpgEditor::slotFileOpen, actionCollection());
+ KStandardAction::save(this, &KgpgEditor::slotFileSave, actionCollection());
+ KStandardAction::saveAs(this, &KgpgEditor::slotFileSaveAs, actionCollection());
+ KStandardAction::close(this, &KgpgEditor::slotFileClose, actionCollection());
+ KStandardAction::paste(this, &KgpgEditor::slotEditPaste, actionCollection());
+ KStandardAction::print(this, &KgpgEditor::slotFilePrint, actionCollection());
+ KStandardAction::selectAll(this, &KgpgEditor::slotSelectAll, actionCollection());
+ KStandardAction::find(this, &KgpgEditor::slotFind, actionCollection());
+ KStandardAction::findNext(this, &KgpgEditor::slotFindNext, actionCollection());
+ KStandardAction::findPrev(this, &KgpgEditor::slotFindPrev, actionCollection());
actionCollection()->addAction(KStandardAction::Preferences, QLatin1String( "options_configure" ),
this, SLOT(slotOptions()));
- m_editundo = KStandardAction::undo(this, SLOT(slotundo()), actionCollection());
- m_editredo = KStandardAction::redo(this, SLOT(slotredo()), actionCollection());
- m_editcopy = KStandardAction::copy(this, SLOT(slotEditCopy()), actionCollection());
- m_editcut = KStandardAction::cut(this, SLOT(slotEditCut()), actionCollection());
+ m_editundo = KStandardAction::undo(this, &KgpgEditor::slotundo, actionCollection());
+ m_editredo = KStandardAction::redo(this, &KgpgEditor::slotredo, actionCollection());
+ m_editcopy = KStandardAction::copy(this, &KgpgEditor::slotEditCopy, actionCollection());
+ m_editcut = KStandardAction::cut(this, &KgpgEditor::slotEditCut, actionCollection());
m_recentfiles = KStandardAction::openRecent(this, SLOT(openDocumentFile(QUrl)), this);
menuBar()->addAction(m_recentfiles);