Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma SDK
Commits
2e371d5f
Commit
2e371d5f
authored
Apr 16, 2022
by
Artem Grinev
Browse files
cuttlefish: Show file in FM action
parent
1187d73e
Pipeline
#165275
passed with stage
in 1 minute and 43 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cuttlefish/autotests/CMakeLists.txt
View file @
2e371d5f
...
...
@@ -10,6 +10,7 @@ ecm_add_test(iconmodeltest.cpp ../src/iconmodel.cpp ../src/sortfiltermodel.cpp
LINK_LIBRARIES
Qt::Gui
Qt::Test
KF5::KIOWidgets
KF5::ConfigCore
KF5::IconThemes
KF5::Package
...
...
cuttlefish/package/contents/ui/Actions.qml
View file @
2e371d5f
...
...
@@ -17,6 +17,11 @@ Item {
iconName
:
"
document-open
"
onTriggered
:
Qt
.
openUrlExternally
(
preview
.
fullPath
)
},
Kirigami.Action
{
text
:
i18n
(
"
Open icon containing folder
"
)
iconName
:
"
document-open-folder
"
onTriggered
:
iconModel
.
openContainingFolder
(
preview
.
fullPath
)
},
Kirigami.Action
{
text
:
pickerMode
?
i18n
(
"
Insert icon name
"
)
:
i18n
(
"
Copy icon name to clipboard
"
)
iconName
:
"
edit-copy
"
...
...
cuttlefish/src/iconmodel.cpp
View file @
2e371d5f
...
...
@@ -18,6 +18,7 @@
#include
<QStandardPaths>
#include
<KConfigGroup>
#include
<KIO/OpenFileManagerWindowJob>
#include
<KIconLoader>
#include
<KIconTheme>
#include
<KPackage/PackageLoader>
...
...
@@ -245,6 +246,11 @@ void IconModel::output(const QString &text)
cout
.
flush
();
}
void
IconModel
::
openContainingFolder
(
const
QString
&
filename
)
{
KIO
::
highlightInFileManager
({
QUrl
(
filename
)});
}
QVariantList
IconModel
::
inOtherThemes
(
const
QString
&
name
,
int
iconSize
)
{
QVariantList
list
;
...
...
cuttlefish/src/iconmodel.h
View file @
2e371d5f
...
...
@@ -57,6 +57,8 @@ public:
Q_INVOKABLE
void
output
(
const
QString
&
text
);
Q_INVOKABLE
void
openContainingFolder
(
const
QString
&
filename
);
Q_SIGNALS:
void
categoriesChanged
();
void
loadingChanged
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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