mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 06:13:09 +00:00
Port to KStandardActions
This commit is contained in:
parent
d49143456e
commit
6da6f3fd55
2 changed files with 4 additions and 4 deletions
|
|
@ -41,7 +41,6 @@ target_link_libraries(mobileshellplugin
|
|||
Qt::Qml
|
||||
Qt::Gui
|
||||
Qt::Quick
|
||||
KF6::ConfigWidgets # for KStandardAction
|
||||
KF6::KIOGui
|
||||
Plasma::Plasma
|
||||
KF6::I18n
|
||||
|
|
@ -51,6 +50,7 @@ target_link_libraries(mobileshellplugin
|
|||
KF6::KIOWidgets # for PreviewJob
|
||||
KF6::Service
|
||||
KF6::Package
|
||||
KF6::ConfigGui
|
||||
LayerShellQt::Interface
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <KPropertiesDialog>
|
||||
#include <KProtocolManager>
|
||||
#include <KSharedConfig>
|
||||
#include <KStandardAction>
|
||||
#include <KStandardActions>
|
||||
#include <KUrlMimeData>
|
||||
|
||||
#include <KIO/DeleteOrTrashJob>
|
||||
|
|
@ -147,7 +147,7 @@ void NotificationFileMenu::open(int x, int y)
|
|||
auto *job = new KIO::DeleteOrTrashJob(urls, KIO::AskUserActionInterface::Trash, KIO::AskUserActionInterface::DefaultConfirmation, this);
|
||||
job->start();
|
||||
};
|
||||
auto moveToTrashAction = KStandardAction::moveToTrash(this, moveToTrashLambda, menu);
|
||||
auto moveToTrashAction = KStandardActions::moveToTrash(this, moveToTrashLambda, menu);
|
||||
moveToTrashAction->setShortcut({}); // Can't focus notification to press Delete
|
||||
menu->addAction(moveToTrashAction);
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ void NotificationFileMenu::open(int x, int y)
|
|||
auto *job = new KIO::DeleteOrTrashJob(urls, KIO::AskUserActionInterface::Delete, KIO::AskUserActionInterface::DefaultConfirmation, this);
|
||||
job->start();
|
||||
};
|
||||
auto deleteAction = KStandardAction::deleteFile(this, deleteLambda, menu);
|
||||
auto deleteAction = KStandardActions::deleteFile(this, deleteLambda, menu);
|
||||
deleteAction->setShortcut({});
|
||||
menu->addAction(deleteAction);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue