Sailfish port mostly done, bumped version to 6.0
[quandoparte] / application / main.cpp
index 29a4fdf..484529b 100644 (file)
@@ -19,12 +19,18 @@ Boston, MA 02110-1301, USA.
 
 */
 
+#ifdef TARGET_PLATFORM_FREMANTLE
 #include "app.h"
-#ifndef TARGET_PLATFORM_FREMANTLE
+#else
 #include "view.h"
 #endif
 
+#include <QtGlobal>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
+#include <QtWidgets/QApplication>
+#else
 #include <QtGui/QApplication>
+#endif
 #include <QDir>
 #include <QDebug>
 #include <QLocale>
@@ -40,7 +46,9 @@ Boston, MA 02110-1301, USA.
 
 Q_DECL_EXPORT int main(int argc, char *argv[])
 {
-#ifdef TARGET_PLATFORM_HARMATTAN
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
+    QScopedPointer< QApplication > a(new QApplication(argc, argv));
+#elif TARGET_PLATFORM_HARMATTAN
     QScopedPointer< QApplication > a(MDeclarativeCache::qApplication(argc, argv));
 #else
     QScopedPointer< QApplication > a(new QApplication(argc, argv));