Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Add-ons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma Add-ons
Commits
0a919bc0
Commit
0a919bc0
authored
Jan 31, 2018
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mediaframe applet] Fix creation of file search filter by QImageReader data
parent
ce1d40c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
applets/mediaframe/plugin/mediaframe.cpp
applets/mediaframe/plugin/mediaframe.cpp
+7
-6
No files found.
applets/mediaframe/plugin/mediaframe.cpp
View file @
0a919bc0
...
...
@@ -24,6 +24,7 @@
#include <QUrl>
#include <QDebug>
#include <QImageReader>
#include <QMimeDatabase>
#include <QTime>
#include <QRegularExpression>
#include <QCryptographicHash>
...
...
@@ -36,13 +37,13 @@ MediaFrame::MediaFrame(QObject *parent) : QObject(parent)
{
qsrand
(
QTime
::
currentTime
().
msec
());
QList
<
QByteArray
>
list
=
QImageReader
::
supportedImageFormat
s
();
//qDebug() << "List" << list
;
for
(
int
i
=
0
;
i
<
list
.
count
();
++
i
)
{
QString
str
(
list
[
i
].
constData
(
));
m_filters
<<
"*."
+
str
;
const
auto
imageMimeTypeNames
=
QImageReader
::
supportedMimeType
s
();
QMimeDatabase
mimeDb
;
for
(
const
auto
&
imageMimeTypeName
:
imageMimeTypeNames
)
{
const
auto
mimeType
=
mimeDb
.
mimeTypeForName
(
QLatin1String
(
imageMimeTypeName
));
m_filters
<<
mimeType
.
globPatterns
()
;
}
qDebug
()
<<
"Added"
<<
list
.
count
()
<<
"filters"
;
qDebug
()
<<
"Added"
<<
m_filters
.
count
()
<<
"filters"
;
//qDebug() << m_filters;
m_watchFile
=
""
;
m_next
=
0
;
...
...
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