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
0811bf4a
Commit
0811bf4a
authored
Feb 19, 2021
by
David Lerch
Browse files
Use only enabled preview plugins in InformationPanelContent and ToolTipManager.
parent
d691aa96
Pipeline
#51656
passed with stage
in 7 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/panels/information/informationpanelcontent.cpp
View file @
0811bf4a
...
...
@@ -8,11 +8,13 @@
#include <KIO/JobUiDelegate>
#include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KIconEffect>
#include <KIconLoader>
#include <KJobWidgets>
#include <KLocalizedString>
#include <KSeparator>
#include <KSharedConfig>
#include <KStringHandler>
#include <QPainterPath>
...
...
@@ -184,7 +186,8 @@ void InformationPanelContent::refreshPixmapView()
// can be shown within a short timeframe.
m_outdatedPreviewTimer
->
start
();
QStringList
plugins
=
KIO
::
PreviewJob
::
availablePlugins
();
const
KConfigGroup
globalConfig
(
KSharedConfig
::
openConfig
(),
"PreviewSettings"
);
const
QStringList
plugins
=
globalConfig
.
readEntry
(
"Plugins"
,
KIO
::
PreviewJob
::
defaultPlugins
());
m_previewJob
=
new
KIO
::
PreviewJob
(
KFileItemList
()
<<
m_item
,
QSize
(
m_preview
->
width
(),
m_preview
->
height
()),
&
plugins
);
...
...
src/views/tooltips/tooltipmanager.cpp
View file @
0811bf4a
...
...
@@ -10,7 +10,9 @@
#include <KIO/JobUiDelegate>
#include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KJobWidgets>
#include <KSharedConfig>
#include <KToolTipWidget>
#include <KIconLoader>
...
...
@@ -132,7 +134,8 @@ void ToolTipManager::startContentRetrieval()
// Request a preview of the item
m_fileMetaDataWidget
->
setPreview
(
QPixmap
());
QStringList
plugins
=
KIO
::
PreviewJob
::
availablePlugins
();
const
KConfigGroup
globalConfig
(
KSharedConfig
::
openConfig
(),
"PreviewSettings"
);
const
QStringList
plugins
=
globalConfig
.
readEntry
(
"Plugins"
,
KIO
::
PreviewJob
::
defaultPlugins
());
KIO
::
PreviewJob
*
job
=
new
KIO
::
PreviewJob
(
KFileItemList
()
<<
m_item
,
QSize
(
256
,
256
),
&
plugins
);
...
...
Write
Preview
Supports
Markdown
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