diff options
author | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-12-18 12:48:00 +0100 |
---|---|---|
committer | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-12-18 12:48:00 +0100 |
commit | a8cf40aa15fb5524c798cc09f715adadeaed42c0 (patch) | |
tree | 1f80af1197e61caac9b33bb4ddb281e5d2a05933 | |
parent | 3429f5cd4a001dd48cf322ab083cb2127f8aaef7 (diff) |
Make code compile under Qt 4.x
4 files changed, 26 insertions, 1 deletions
diff --git a/include/QtMimeTypes/QtMimeTypes.pro b/include/QtMimeTypes/QtMimeTypes.pro index 76a80fc..8ff93a8 100644 --- a/include/QtMimeTypes/QtMimeTypes.pro +++ b/include/QtMimeTypes/QtMimeTypes.pro @@ -1,4 +1,9 @@ -TEMPLATE = aux +equals(QT_VERSION, 4.7.4): { + TEMPLATE = subdirs +} +else { + TEMPLATE = aux +} the_includes.files += QMimeDatabase \ QMimeType \ diff --git a/src/mimetypes/qmimetype.cpp b/src/mimetypes/qmimetype.cpp index 514a074..a8b53b2 100644 --- a/src/mimetypes/qmimetype.cpp +++ b/src/mimetypes/qmimetype.cpp @@ -302,7 +302,9 @@ QString QMimeType::comment(const QString& localeName) const if (!localeName.isEmpty()) languageList << localeName; languageList << QLocale::system().name(); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) languageList << QLocale::system().uiLanguages(); +#endif Q_FOREACH(const QString& lang, languageList) { const QString comm = d->localeComments.value(lang); if (!comm.isEmpty()) diff --git a/tests/auto/qdeclarativemimedatabase/tst_qdeclarativemimedatabase.cpp b/tests/auto/qdeclarativemimedatabase/tst_qdeclarativemimedatabase.cpp index 4479743..3aea081 100644 --- a/tests/auto/qdeclarativemimedatabase/tst_qdeclarativemimedatabase.cpp +++ b/tests/auto/qdeclarativemimedatabase/tst_qdeclarativemimedatabase.cpp @@ -39,6 +39,15 @@ ** ****************************************************************************/ +#include <QtCore/qglobal.h> + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include <QtQuickTest/quicktest.h> QUICK_TEST_MAIN(mytest) +#else +int main() +{ + return 1; +} +#endif diff --git a/tests/auto/qdeclarativemimetype/tst_qdeclarativemimetype.cpp b/tests/auto/qdeclarativemimetype/tst_qdeclarativemimetype.cpp index 4479743..3aea081 100644 --- a/tests/auto/qdeclarativemimetype/tst_qdeclarativemimetype.cpp +++ b/tests/auto/qdeclarativemimetype/tst_qdeclarativemimetype.cpp @@ -39,6 +39,15 @@ ** ****************************************************************************/ +#include <QtCore/qglobal.h> + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include <QtQuickTest/quicktest.h> QUICK_TEST_MAIN(mytest) +#else +int main() +{ + return 1; +} +#endif |