Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
Dolphin
Commits
dd7f3fb7
Commit
dd7f3fb7
authored
Apr 17, 2021
by
Alexander Lohnau
💬
Committed by
Elvis Angelaccio
Jul 04, 2021
Browse files
contextmenu: Listen to new error signal from KFileItemActions
Task:
https://phabricator.kde.org/T12164
parent
8ef8e03e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dolphincontextmenu.cpp
View file @
dd7f3fb7
...
...
@@ -33,6 +33,7 @@
#include <KPluginMetaData>
#include <KStandardAction>
#include <KToolBar>
#include <kio_version.h>
#include <QApplication>
#include <QClipboard>
...
...
@@ -222,6 +223,11 @@ void DolphinContextMenu::openItemContextMenu()
KFileItemActions
fileItemActions
;
fileItemActions
.
setParentWidget
(
m_mainWindow
);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0)
connect
(
&
fileItemActions
,
&
KFileItemActions
::
error
,
this
,
[
this
](
const
QString
&
errorMessage
)
{
m_mainWindow
->
activeViewContainer
()
->
showMessage
(
errorMessage
,
DolphinViewContainer
::
Error
);
});
#endif
fileItemActions
.
setItemListProperties
(
selectedItemsProps
);
if
(
m_selectedItems
.
count
()
==
1
)
{
...
...
@@ -313,6 +319,11 @@ void DolphinContextMenu::openViewportContextMenu()
const
KFileItemListProperties
baseUrlProperties
(
KFileItemList
()
<<
baseFileItem
());
KFileItemActions
fileItemActions
;
fileItemActions
.
setParentWidget
(
m_mainWindow
);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0)
connect
(
&
fileItemActions
,
&
KFileItemActions
::
error
,
this
,
[
this
](
const
QString
&
errorMessage
)
{
m_mainWindow
->
activeViewContainer
()
->
showMessage
(
errorMessage
,
DolphinViewContainer
::
Error
);
});
#endif
fileItemActions
.
setItemListProperties
(
baseUrlProperties
);
// Set up and insert 'Create New' menu
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment