Permalink
Browse files

Fix version

  • Loading branch information...
1 parent de0b070 commit 5158ff15872a9fe222bf2558f67b1520c9f9516c ABBAPOH committed Apr 30, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 CMakeLists.txt
  2. +4 −0 src/libs/io/qmimedatabase.cpp
  3. +2 −0 src/libs/io/qmimetype.cpp
View
@@ -3,7 +3,7 @@ project( andromeda )
cmake_minimum_required( VERSION 2.6 )
# common Qt directives
-set(QT_MIN_VERSION "4.8.0")
+set(QT_MIN_VERSION "4.7.0")
find_package( Qt4 REQUIRED )
include( ${QT_USE_FILE} )
add_definitions( ${QT_DEFINITIONS} )
@@ -522,7 +522,11 @@ QMimeType QMimeDatabase::mimeTypeForData(QIODevice *device) const
*/
QMimeType QMimeDatabase::mimeTypeForUrl(const QUrl &url) const
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 8, 0))
if (url.isLocalFile())
+#else
+ if (url.scheme() == QLatin1String("file"))
+#endif
return mimeTypeForFile(url.toLocalFile());
const QString scheme = url.scheme();
@@ -280,7 +280,9 @@ QString QMimeType::comment() const
QStringList languageList;
languageList << QLocale::system().name();
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 8, 0))
languageList << QLocale::system().uiLanguages();
+#endif
Q_FOREACH (const QString &language, languageList) {
const QString lang = language == QLatin1String("C") ? QLatin1String("en_US") : language;
const QString comm = d->localeComments.value(lang);

0 comments on commit 5158ff1

Please sign in to comment.