X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dd7f3fb783a2164e282d88140f301bf8c0af9e5b..30299e00b137fb5abf31e6f82fc8f4753f9a929a:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index d8c27526b..fe39d4d2f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -65,6 +65,8 @@ #include #include +#include + #include #include #include @@ -207,6 +209,13 @@ DolphinMainWindow::DolphinMainWindow() : connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, &DolphinMainWindow::updateOpenPreferredSearchToolAction); QTimer::singleShot(0, this, &DolphinMainWindow::updateOpenPreferredSearchToolAction); + + m_fileItemActions.setParentWidget(this); +#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0) + connect(&m_fileItemActions, &KFileItemActions::error, this, [this](const QString &errorMessage) { + showErrorMessage(errorMessage); + }); +#endif } DolphinMainWindow::~DolphinMainWindow() @@ -1125,7 +1134,7 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, const QUrl& url, const QList& customActions) { - QPointer contextMenu = new DolphinContextMenu(this, pos, item, url); + QPointer contextMenu = new DolphinContextMenu(this, pos, item, url, &m_fileItemActions); contextMenu.data()->setCustomActions(customActions); const DolphinContextMenu::Command command = contextMenu.data()->open();