From 697d58e9727e229abb81956d27a05d1f02d8c775 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Mon, 9 Jun 2025 12:16:36 +0000 Subject: Add a SetFolderIcon ItemAction plugin To allow to change folder icon from the context menu. CCBUG: 467221 --- src/dolphincontextmenu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dolphincontextmenu.cpp') diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 8372060aa..e1c67aad1 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -122,7 +122,7 @@ void DolphinContextMenu::addTrashContextMenu() { Q_ASSERT(m_context & TrashContext); - QAction *emptyTrashAction = addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action:inmenu", "Empty Trash"), [this]() { + QAction *emptyTrashAction = addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action:inmenu", "Empty Trash"), this, [this]() { Trash::empty(m_mainWindow); }); emptyTrashAction->setEnabled(!Trash::isEmpty()); @@ -154,6 +154,7 @@ void DolphinContextMenu::addTrashItemContextMenu() "Restore to Former Location", "Restore to Former Locations", m_selectedItems.count()), + this, [this]() { QList selectedUrls; selectedUrls.reserve(m_selectedItems.count()); @@ -202,7 +203,7 @@ void DolphinContextMenu::addDirectoryItemContextMenu() // set up 'Create New' menu QAction *newDirAction = m_mainWindow->actionCollection()->action(QStringLiteral("create_dir")); QAction *newFileAction = m_mainWindow->actionCollection()->action(QStringLiteral("create_file")); - DolphinNewFileMenu *newFileMenu = new DolphinNewFileMenu(newDirAction, newFileAction, m_mainWindow); + DolphinNewFileMenu *newFileMenu = new DolphinNewFileMenu(newDirAction, newFileAction, this); newFileMenu->checkUpToDate(); newFileMenu->setWorkingDirectory(m_fileInfo.url()); newFileMenu->setEnabled(selectedItemsProps.supportsWriting()); -- cgit v1.3