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 # Load the frameworks we need
find_package(KF5 5.16 REQUIRED find_package(KF5 5.23 REQUIRED
Config Config
ConfigWidgets
CoreAddons
Crash Crash
DocTools DocTools
I18n I18n

View File

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

View File

@ -41,11 +41,14 @@ target_link_libraries(partitionmanager ${BLKID_LIBRARIES}
kpmcore kpmcore
KF5::ConfigCore KF5::ConfigCore
KF5::ConfigGui KF5::ConfigGui
KF5::ConfigWidgets
KF5::CoreAddons
KF5::Crash KF5::Crash
KF5::I18n KF5::I18n
KF5::IconThemes KF5::IconThemes
KF5::JobWidgets KF5::JobWidgets
KF5::KIOWidgets KF5::KIOWidgets
KF5::Service
KF5::WidgetsAddons KF5::WidgetsAddons
KF5::XmlGui KF5::XmlGui
) )

View File

@ -179,7 +179,7 @@ void MainWindow::changeEvent(QEvent* event)
void MainWindow::setupActions() void MainWindow::setupActions()
{ {
// File actions // File actions
KStandardAction::quit(this, SLOT(close()), actionCollection()); KStandardAction::quit(this, &MainWindow::close, actionCollection());
// Edit actions // Edit actions
QAction* undoOperation = actionCollection()->addAction(QStringLiteral("undoOperation")); QAction* undoOperation = actionCollection()->addAction(QStringLiteral("undoOperation"));
@ -377,7 +377,7 @@ void MainWindow::setupActions()
actionCollection()->addAction(QStringLiteral("toggleDockLog"), dockLog().toggleViewAction()); actionCollection()->addAction(QStringLiteral("toggleDockLog"), dockLog().toggleViewAction());
// Settings Actions // Settings Actions
KStandardAction::preferences(this, SLOT(onConfigureOptions()), actionCollection()); KStandardAction::preferences(this, &MainWindow::onConfigureOptions, actionCollection());
// Log Actions // Log Actions
QAction* clearLog = actionCollection()->addAction(QStringLiteral("clearLog")); 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_TreeLog_contextMenuRequested(const QPoint& pos);
void on_m_ListOperations_contextMenuRequested(const QPoint& pos); void on_m_ListOperations_contextMenuRequested(const QPoint& pos);
protected:
void scanDevices(); void scanDevices();
void onRefreshDevices(); void onRefreshDevices();