summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-06-03 23:59:01 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-06-03 23:59:01 (GMT)
commit23ab7fba0f49413fceb2717b11d016ef768ed174 (patch)
tree6f38f3fec764dc31e1532f8471ae8092b5ef6171
parent208f5d07d46d9d24e8306b175d8b6fba30f5ff89 (diff)
Port away from KMimeType.
-rw-r--r--kgpg.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kgpg.cpp b/kgpg.cpp
index b190ec7..bebf0dc 100644
--- a/kgpg.cpp
+++ b/kgpg.cpp
@@ -26,12 +26,13 @@
#include "transactions/kgpgimport.h"
#include <QFile>
+#include <QMimeDatabase>
+#include <QMimeType>
#include <QTextStream>
#include <KCmdLineArgs>
#include <KMessageBox>
#include <KWindowSystem>
-#include <KMimeType>
using namespace KgpgCore;
@@ -117,11 +118,13 @@ int KGpgApp::newInstance()
urlList.append(args->url(ct));
bool directoryInside = false;
- foreach (const KUrl &url, urlList)
- if (KMimeType::findByUrl(url)->name() == QLatin1String( "inode/directory" )) {
+ foreach (const KUrl &url, urlList) {
+ QMimeDatabase db;
+ if (db.mimeTypeForUrl(url).name() == QLatin1String( "inode/directory" )) {
directoryInside = true;
break;
}
+ }
if (args->isSet("e")) {
if (urlList.isEmpty())