From 2b7f23ec2703936893d34f80e3ee65bb762351f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 1 Jul 2016 15:42:12 +0100 Subject: [PATCH] Use new connect style with KStandardAction. --- CMakeLists.txt | 4 +++- README.md | 1 - src/CMakeLists.txt | 3 +++ src/gui/mainwindow.cpp | 4 ++-- src/gui/mainwindow.h | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 256f26d..e5fd532 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,10 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS ) # Load the frameworks we need -find_package(KF5 5.16 REQUIRED +find_package(KF5 5.23 REQUIRED Config + ConfigWidgets + CoreAddons Crash DocTools I18n diff --git a/README.md b/README.md index 6cfdf00..b7a2246 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,3 @@ systems. For quick install instructions see INSTALL. For a list of changes since the previous release see CHANGES. - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 626644c..b349888 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,11 +41,14 @@ target_link_libraries(partitionmanager ${BLKID_LIBRARIES} kpmcore KF5::ConfigCore KF5::ConfigGui + KF5::ConfigWidgets + KF5::CoreAddons KF5::Crash KF5::I18n KF5::IconThemes KF5::JobWidgets KF5::KIOWidgets + KF5::Service KF5::WidgetsAddons KF5::XmlGui ) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 97bc6d7..5ef75dc 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -179,7 +179,7 @@ void MainWindow::changeEvent(QEvent* event) void MainWindow::setupActions() { // File actions - KStandardAction::quit(this, SLOT(close()), actionCollection()); + KStandardAction::quit(this, &MainWindow::close, actionCollection()); // Edit actions QAction* undoOperation = actionCollection()->addAction(QStringLiteral("undoOperation")); @@ -377,7 +377,7 @@ void MainWindow::setupActions() actionCollection()->addAction(QStringLiteral("toggleDockLog"), dockLog().toggleViewAction()); // Settings Actions - KStandardAction::preferences(this, SLOT(onConfigureOptions()), actionCollection()); + KStandardAction::preferences(this, &MainWindow::onConfigureOptions, actionCollection()); // Log Actions QAction* clearLog = actionCollection()->addAction(QStringLiteral("clearLog")); diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 82e13e7..b00fe09 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -235,6 +235,7 @@ protected Q_SLOTS: void on_m_TreeLog_contextMenuRequested(const QPoint& pos); void on_m_ListOperations_contextMenuRequested(const QPoint& pos); +protected: void scanDevices(); void onRefreshDevices();