summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuís Pereira <luis.artur.pereira@gmail.com>2013-08-22 07:02:43 -0700
committerLuís Pereira <luis.artur.pereira@gmail.com>2013-08-28 14:27:49 +0200
commit7b9f83cfd9cebba1d4fa7fe397691117be91bf1f (patch)
tree15ac8a9a50df10140901a2cf377b295cbd7efbce
parente662547f9b2ff51c8cb362b5fed32c53c939ba68 (diff)
Reworks the detect Qt5 then abort
One check at the source code level is enough. Added a check in the project file so we can abort earlier. Change-Id: I37f2562d583c5fb54005e22a2a6894dc9054c8f3 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
-rw-r--r--qtmimetypes.pro7
-rw-r--r--src/mimetypes/qmimedatabase.h2
-rw-r--r--src/mimetypes/qmimetype.h6
3 files changed, 7 insertions, 8 deletions
diff --git a/qtmimetypes.pro b/qtmimetypes.pro
index db7fc14..007371a 100644
--- a/qtmimetypes.pro
+++ b/qtmimetypes.pro
@@ -1,5 +1,12 @@
include(doc/doc.pri)
+# check qt version
+greaterThan(QT_MAJOR_VERSION, 4) {
+ message("Cannot build with Qt version $${QT_VERSION}.")
+ message("With Qt5 use QtCore/QMimeType instead")
+ error("Qt $${QT_VERSION} not supported")
+}
+
TEMPLATE = subdirs
module_include.subdir = include
diff --git a/src/mimetypes/qmimedatabase.h b/src/mimetypes/qmimedatabase.h
index f573ee8..bca0b50 100644
--- a/src/mimetypes/qmimedatabase.h
+++ b/src/mimetypes/qmimedatabase.h
@@ -49,10 +49,8 @@
#include <QtCore/qstringlist.h>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifndef Q_CC_MSVC
#error "Do not try to use this library with Qt5, use QtCore/QMimeType instead"
#endif
-#endif
QT_BEGIN_NAMESPACE
diff --git a/src/mimetypes/qmimetype.h b/src/mimetypes/qmimetype.h
index 78bf9f7..3d281ae 100644
--- a/src/mimetypes/qmimetype.h
+++ b/src/mimetypes/qmimetype.h
@@ -47,12 +47,6 @@
#include <QtCore/qshareddata.h>
#include <QtCore/qstring.h>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifndef Q_CC_MSVC
-// TODO #error "Do not try to use this library with Qt5, use QtCore/QMimeType instead"
-#endif
-#endif
-
QT_BEGIN_NAMESPACE
class QMimeTypePrivate;