diff options
authorDan Vrátil <[email protected]>2015-09-03 16:42:59 +0200
committerDan Vrátil <[email protected]>2015-09-04 16:52:32 +0200
commit1c6da26961adadbaaccf4a5ebeb629a2b7e42022 (patch)
parenta49683f1c0746113c7201c49020c5b72ed1273ae (diff)
KAlarm: port away from KMimeType
2 files changed, 7 insertions, 7 deletions
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index 55da926..6ae7609 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -1604,15 +1604,15 @@ void writeConfigWindowSize(const char* window, const QSize& size, int splitterWi
* If a text file, its type is distinguished.
* Reply = file type.
-FileType fileType(const KMimeType::Ptr& mimetype)
+FileType fileType(const QMimeType& mimetype)
- if (mimetype->is(QStringLiteral("text/html")))
+ if (mimetype.inherits(QStringLiteral("text/html")))
return TextFormatted;
- if (mimetype->is(QStringLiteral("application/x-executable")))
+ if (mimetype.inherits(QStringLiteral("application/x-executable")))
return TextApplication;
- if (mimetype->is(QStringLiteral("text/plain")))
+ if (mimetype.inherits(QStringLiteral("text/plain")))
return TextPlain;
- if (mimetype->name().startsWith(QStringLiteral("image/")))
+ if ("image/")))
return Image;
return Unknown;
diff --git a/kalarm/functions.h b/kalarm/functions.h
index fc470a6..1bed412 100644
--- a/kalarm/functions.h
+++ b/kalarm/functions.h
@@ -30,12 +30,12 @@
#include <AkonadiCore/collection.h>
#include <AkonadiCore/item.h>
#include <kfile.h>
-#include <kmimetype.h>
#include <KUrl>
#include <QSize>
#include <QString>
#include <QVector>
+#include <QMimeType>
using namespace KAlarmCal;
@@ -90,7 +90,7 @@ void writeConfigWindowSize(const char* window, const QSize&, int
/** Check from its mime type whether a file appears to be a text or image file.
* If a text file, its type is distinguished.
-FileType fileType(const KMimeType::Ptr& mimetype);
+FileType fileType(const QMimeType& mimetype);
/** Check that a file exists and is a plain readable file, optionally a text/image file.
* Display a Continue/Cancel error message if 'errmsgParent' non-null.