Use new connect style with KStandardAction.

This commit is contained in:
Andrius Štikonas 2016-07-01 15:42:12 +01:00
parent 63a75bb4e6
commit 2b7f23ec27
5 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -33,4 +33,3 @@ systems.
For quick install instructions see INSTALL.
For a list of changes since the previous release see CHANGES.

View File

@ -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
)

View File

@ -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"));

View File

@ -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();