2014-09-10 17:16:16 +02:00
|
|
|
From ae87a7d6999fc6ad90ab300dd8ea0c9c68c02bd4 Mon Sep 17 00:00:00 2001
|
2014-09-09 12:14:49 +02:00
|
|
|
From: Maarten De Meyer <de.meyer.maarten@gmail.com>
|
|
|
|
Date: Mon, 8 Sep 2014 23:58:55 +0200
|
2014-09-10 17:16:16 +02:00
|
|
|
Subject: [PATCH 1/2] Fix thumbnails for mimetype groups.
|
2014-09-09 12:14:49 +02:00
|
|
|
|
|
|
|
KService::mimeTypes cannot handle mimetype groups. ex: text/*
|
|
|
|
Go back to KService::serviceTypes and remove 'ThumbCreator' entries.
|
|
|
|
|
|
|
|
REVIEW: 119958
|
|
|
|
---
|
|
|
|
src/widgets/previewjob.cpp | 17 +++++++++++------
|
|
|
|
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
|
2014-09-10 17:16:16 +02:00
|
|
|
index 55a3fb7..ca47934 100644
|
2014-09-09 12:14:49 +02:00
|
|
|
--- a/src/widgets/previewjob.cpp
|
|
|
|
+++ b/src/widgets/previewjob.cpp
|
|
|
|
@@ -268,20 +268,25 @@ void PreviewJobPrivate::startPreview()
|
|
|
|
protocols.append(p);
|
|
|
|
}
|
|
|
|
foreach (const QString &protocol, protocols) {
|
|
|
|
- const QStringList mtypes = (*it)->mimeTypes();
|
2014-09-10 17:16:16 +02:00
|
|
|
+ // We cannot use mimeTypes() here, it doesn't support groups such as: text/*
|
2014-09-09 12:14:49 +02:00
|
|
|
+ const QStringList mtypes = (*it)->serviceTypes();
|
|
|
|
// Add supported mimetype for this protocol
|
|
|
|
QStringList &_ms = m_remoteProtocolPlugins[protocol];
|
|
|
|
foreach (const QString &_m, mtypes) {
|
|
|
|
- protocolMap[protocol].insert(_m, *it);
|
|
|
|
- if (!_ms.contains(_m)) {
|
|
|
|
- _ms.append(_m);
|
|
|
|
+ if (_m != QLatin1String("ThumbCreator")) {
|
|
|
|
+ protocolMap[protocol].insert(_m, *it);
|
|
|
|
+ if (!_ms.contains(_m)) {
|
|
|
|
+ _ms.append(_m);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (enabledPlugins.contains((*it)->desktopEntryName())) {
|
|
|
|
- const QStringList mimeTypes = (*it)->mimeTypes();
|
|
|
|
+ const QStringList mimeTypes = (*it)->serviceTypes();
|
|
|
|
for (QStringList::ConstIterator mt = mimeTypes.constBegin(); mt != mimeTypes.constEnd(); ++mt) {
|
|
|
|
- mimeMap.insert(*mt, *it);
|
|
|
|
+ if (*mt != QLatin1String("ThumbCreator")) {
|
|
|
|
+ mimeMap.insert(*mt, *it);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
|
|
|
2.1.0
|
|
|
|
|