##// END OF EJS Templates
Fixing qml build for latest Qt5...
Jani Honkonen -
r2247:c28e9eaa694f
parent child
Show More
@@ -85,8 +85,6 linux-arm*: {
85 DEFINES+=QT_ON_ARM
85 DEFINES+=QT_ON_ARM
86 }
86 }
87
87
88 greaterThan(QT_MAJOR_VERSION, 4): DEFINES += QT5_QUICK_1
89
90 ##################### INCLUDES ############################################################
88 ##################### INCLUDES ############################################################
91
89
92
90
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeEngine>
24 #else
25 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeEngine>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28
24
29 Q_DECL_EXPORT int main(int argc, char *argv[])
25 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeEngine>
24 #else
25 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeEngine>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28
24
29 Q_DECL_EXPORT int main(int argc, char *argv[])
25 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeEngine>
24 #else
25 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeEngine>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28
24
29 Q_DECL_EXPORT int main(int argc, char *argv[])
25 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeEngine>
24 #else
25 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeEngine>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28
24
29 Q_DECL_EXPORT int main(int argc, char *argv[])
25 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,14 +19,8
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/qdeclarative.h>
24 #include <QtQuick1/QDeclarativeEngine>
25 #else
26 #include <QtDeclarative>
22 #include <QtDeclarative>
27 #include <QtDeclarative/QDeclarativeEngine>
23 #include <QtDeclarative/QDeclarativeEngine>
28 #endif
29 //#include <QtDeclarative>
30 #include <QAbstractItemModel>
24 #include <QAbstractItemModel>
31 #include "declarativemodel.h"
25 #include "declarativemodel.h"
32 #include "customtablemodel.h"
26 #include "customtablemodel.h"
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -13,16 +13,9
13 #include <QDir>
13 #include <QDir>
14 #include <QFileInfo>
14 #include <QFileInfo>
15 #include <QApplication>
15 #include <QApplication>
16 #ifdef QT5_QUICK_1
17 #include <QtQuick1/QDeclarativeComponent>
18 #include <QtQuick1/QDeclarativeEngine>
19 #include <QtQuick1/QDeclarativeContext>
20 #else
21 #include <QtDeclarative/QDeclarativeComponent>
16 #include <QtDeclarative/QDeclarativeComponent>
22 #include <QtDeclarative/QDeclarativeEngine>
17 #include <QtDeclarative/QDeclarativeEngine>
23 #include <QtDeclarative/QDeclarativeContext>
18 #include <QtDeclarative/QDeclarativeContext>
24 #endif
25
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
19 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
27
20
28 #ifdef HARMATTAN_BOOSTER
21 #ifdef HARMATTAN_BOOSTER
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -5,11 +5,7
5 # It is recommended not to modify this file, since newer versions of Qt Creator
5 # It is recommended not to modify this file, since newer versions of Qt Creator
6 # may offer an updated version of it.
6 # may offer an updated version of it.
7
7
8 greaterThan(QT_MAJOR_VERSION, 4) {
9 QT += quick1
10 } else {
11 QT += declarative
8 QT += declarative
12 }
13
9
14 SOURCES += $$PWD/qmlapplicationviewer.cpp
10 SOURCES += $$PWD/qmlapplicationviewer.cpp
15 HEADERS += $$PWD/qmlapplicationviewer.h
11 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeContext>
24 #else
25 #include <QtDeclarative/QDeclarativeContext>
22 #include <QtDeclarative/QDeclarativeContext>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28 #include "datasource.h"
24 #include "datasource.h"
29
25
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeContext>
24 #else
25 #include <QtDeclarative/QDeclarativeContext>
22 #include <QtDeclarative/QDeclarativeContext>
26 #endif
27 #include <QDebug>
23 #include <QDebug>
28 #include "qmlapplicationviewer.h"
24 #include "qmlapplicationviewer.h"
29
25
@@ -12,15 +12,9
12
12
13 #include <QDir>
13 #include <QDir>
14 #include <QFileInfo>
14 #include <QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -5,11 +5,7
5 # It is recommended not to modify this file, since newer versions of Qt Creator
5 # It is recommended not to modify this file, since newer versions of Qt Creator
6 # may offer an updated version of it.
6 # may offer an updated version of it.
7
7
8 greaterThan(QT_MAJOR_VERSION, 4) {
9 QT += quick1
10 } else {
11 QT += declarative
8 QT += declarative
12 }
13
9
14 SOURCES += $$PWD/qmlapplicationviewer.cpp
10 SOURCES += $$PWD/qmlapplicationviewer.cpp
15 HEADERS += $$PWD/qmlapplicationviewer.h
11 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -19,11 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include <QApplication>
21 #include <QApplication>
22 #ifdef QT5_QUICK_1
23 #include <QtQuick1/QDeclarativeEngine>
24 #else
25 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeEngine>
26 #endif
27 #include "qmlapplicationviewer.h"
23 #include "qmlapplicationviewer.h"
28
24
29 Q_DECL_EXPORT int main(int argc, char *argv[])
25 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -12,16 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24
25 #include <QApplication>
18 #include <QApplication>
26
19
27 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -3,11 +3,7
3 }
3 }
4
4
5 TARGET = qtcommercialchartqml
5 TARGET = qtcommercialchartqml
6 greaterThan(QT_MAJOR_VERSION, 4) {
7 QT += quick1
8 } else {
9 QT += declarative
6 QT += declarative
10 }
11 DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR
7 DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR
12 INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR
8 INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR
13
9
@@ -28,13 +28,8
28 #include "qhorizontalstackedbarseries.h"
28 #include "qhorizontalstackedbarseries.h"
29 #include "qhorizontalpercentbarseries.h"
29 #include "qhorizontalpercentbarseries.h"
30 #include "qbarset.h"
30 #include "qbarset.h"
31 #ifdef QT5_QUICK_1
32 #include <QtQuick1/QDeclarativeItem>
33 #include <QtQuick1/QDeclarativeParserStatus>
34 #else
35 #include <QtDeclarative/QDeclarativeItem>
31 #include <QtDeclarative/QDeclarativeItem>
36 #include <QtDeclarative/QDeclarativeParserStatus>
32 #include <QtDeclarative/QDeclarativeParserStatus>
37 #endif
38
33
39 QTCOMMERCIALCHART_BEGIN_NAMESPACE
34 QTCOMMERCIALCHART_BEGIN_NAMESPACE
40
35
@@ -22,13 +22,8
22 #define DECLARATIVECATEGORYAXIS_H
22 #define DECLARATIVECATEGORYAXIS_H
23
23
24 #include "qcategoryaxis.h"
24 #include "qcategoryaxis.h"
25 #ifdef QT5_QUICK_1
26 #include <QtQuick1/QDeclarativeListProperty>
27 #include <QtQuick1/QDeclarativeParserStatus>
28 #else
29 #include <QtDeclarative/QDeclarativeListProperty>
25 #include <QtDeclarative/QDeclarativeListProperty>
30 #include <QtDeclarative/QDeclarativeParserStatus>
26 #include <QtDeclarative/QDeclarativeParserStatus>
31 #endif
32
27
33 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
34
29
@@ -22,11 +22,8
22 #define DECLARATIVECHART_H
22 #define DECLARATIVECHART_H
23
23
24 #include <QtCore/QtGlobal>
24 #include <QtCore/QtGlobal>
25 #ifdef QT5_QUICK_1
26 #include <QtQuick1/QDeclarativeItem>
27 #else
28 #include <QtDeclarative/QDeclarativeItem>
25 #include <QtDeclarative/QDeclarativeItem>
29 #endif
26
30 #include "qchart.h"
27 #include "qchart.h"
31
28
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -121,7 +118,7 public:
121 qreal leftMargin();
118 qreal leftMargin();
122 qreal rightMargin();
119 qreal rightMargin();
123 void createDefaultAxes(QAbstractSeries *series);
120 void createDefaultAxes(QAbstractSeries *series);
124 //TODO this is depreciated:
121 //TODO this is deprecated:
125 DeclarativeMargins *minimumMargins() { return m_margins; }
122 DeclarativeMargins *minimumMargins() { return m_margins; }
126
123
127 Q_REVISION(2) DeclarativeMargins *margins() { return m_margins; }
124 Q_REVISION(2) DeclarativeMargins *margins() { return m_margins; }
@@ -23,13 +23,8
23
23
24 #include "qlineseries.h"
24 #include "qlineseries.h"
25 #include "declarativexyseries.h"
25 #include "declarativexyseries.h"
26 #ifdef QT5_QUICK_1
27 #include <QtQuick1/QDeclarativeListProperty>
28 #include <QtQuick1/QDeclarativeParserStatus>
29 #else
30 #include <QtDeclarative/QDeclarativeListProperty>
26 #include <QtDeclarative/QDeclarativeListProperty>
31 #include <QtDeclarative/QDeclarativeParserStatus>
27 #include <QtDeclarative/QDeclarativeParserStatus>
32 #endif
33
28
34 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
35
30
@@ -22,13 +22,8
22 #define DECLARATIVEPIESERIES_H
22 #define DECLARATIVEPIESERIES_H
23
23
24 #include "qpieseries.h"
24 #include "qpieseries.h"
25 #ifdef QT5_QUICK_1
26 #include <QtQuick1/QDeclarativeItem>
27 #include <QtQuick1/QDeclarativeParserStatus>
28 #else
29 #include <QtDeclarative/QDeclarativeItem>
25 #include <QtDeclarative/QDeclarativeItem>
30 #include <QtDeclarative/QDeclarativeParserStatus>
26 #include <QtDeclarative/QDeclarativeParserStatus>
31 #endif
32
27
33 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
34 class QPieSlice;
29 class QPieSlice;
@@ -23,13 +23,8
23
23
24 #include "qscatterseries.h"
24 #include "qscatterseries.h"
25 #include "declarativexyseries.h"
25 #include "declarativexyseries.h"
26 #ifdef QT5_QUICK_1
27 #include <QtQuick1/QDeclarativeListProperty>
28 #include <QtQuick1/QDeclarativeParserStatus>
29 #else
30 #include <QtDeclarative/QDeclarativeListProperty>
26 #include <QtDeclarative/QDeclarativeListProperty>
31 #include <QtDeclarative/QDeclarativeParserStatus>
27 #include <QtDeclarative/QDeclarativeParserStatus>
32 #endif
33
28
34 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
35
30
@@ -23,13 +23,8
23
23
24 #include "qsplineseries.h"
24 #include "qsplineseries.h"
25 #include "declarativexyseries.h"
25 #include "declarativexyseries.h"
26 #ifdef QT5_QUICK_1
27 #include <QtQuick1/QDeclarativeListProperty>
28 #include <QtQuick1/QDeclarativeParserStatus>
29 #else
30 #include <QtDeclarative/QDeclarativeListProperty>
26 #include <QtDeclarative/QDeclarativeListProperty>
31 #include <QtDeclarative/QDeclarativeParserStatus>
27 #include <QtDeclarative/QDeclarativeParserStatus>
32 #endif
33
28
34 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
35
30
@@ -18,13 +18,6
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #ifdef QT5_QUICK_1
22 #include <QtQuick1/qdeclarativeextensionplugin.h>
23 #include <QtQuick1/qdeclarative.h>
24 #else
25 #include <QtDeclarative/qdeclarativeextensionplugin.h>
26 #include <QtDeclarative/qdeclarative.h>
27 #endif
28 #include "qchart.h"
21 #include "qchart.h"
29 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
30 #include "qvalueaxis.h"
23 #include "qvalueaxis.h"
@@ -45,11 +38,12
45 #include "qhbarmodelmapper.h"
38 #include "qhbarmodelmapper.h"
46 #include "qvbarmodelmapper.h"
39 #include "qvbarmodelmapper.h"
47 #include "declarativemargins.h"
40 #include "declarativemargins.h"
48 #include <QAbstractItemModel>
49
50 #ifndef QT_ON_ARM
41 #ifndef QT_ON_ARM
51 #include "qdatetimeaxis.h"
42 #include "qdatetimeaxis.h"
52 #endif
43 #endif
44 #include <QAbstractItemModel>
45 #include <QtDeclarative/qdeclarativeextensionplugin.h>
46 #include <QtDeclarative/qdeclarative.h>
53
47
54 QTCOMMERCIALCHART_USE_NAMESPACE
48 QTCOMMERCIALCHART_USE_NAMESPACE
55
49
@@ -62,9 +56,8 class ChartQmlPlugin : public QDeclarativeExtensionPlugin
62 {
56 {
63 Q_OBJECT
57 Q_OBJECT
64
58
65 #ifdef QT5_QUICK_1
59 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
66 // TODO: fix the metadata
60 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface")
67 Q_PLUGIN_METADATA(IID "org.qt-project.foo")
68 #endif
61 #endif
69
62
70 public:
63 public:
@@ -153,6 +146,6 QTCOMMERCIALCHART_END_NAMESPACE
153
146
154 QTCOMMERCIALCHART_USE_NAMESPACE
147 QTCOMMERCIALCHART_USE_NAMESPACE
155
148
156 #ifndef QT5_QUICK_1
149 #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
157 Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin))
150 Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin))
158 #endif
151 #endif
@@ -84,7 +84,7 QWidget *QChartsPlugin::createWidget(QWidget *parent)
84 return new QChartView(new QChart(), parent);
84 return new QChartView(new QChart(), parent);
85 }
85 }
86
86
87 #ifndef QT5_QUICK_1
87 #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
88 Q_EXPORT_PLUGIN2(qtcommercialchart, QChartsPlugin)
88 Q_EXPORT_PLUGIN2(qtcommercialchart, QChartsPlugin)
89 #endif
89 #endif
90
90
@@ -26,8 +26,8
26 class QChartsPlugin: public QObject, public QDesignerCustomWidgetInterface
26 class QChartsPlugin: public QObject, public QDesignerCustomWidgetInterface
27 {
27 {
28
28
29 #ifdef QT5_QUICK_1
29 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
30 Q_PLUGIN_METADATA(IID "org.qt-project.bar")
30 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
31 #endif
31 #endif
32
32
33 Q_OBJECT
33 Q_OBJECT
@@ -31,11 +31,7 private Q_SLOTS:
31
31
32 void tst_ChartDataSet::skip()
32 void tst_ChartDataSet::skip()
33 {
33 {
34 #ifdef QT5_QUICK_1
35 QSKIP("This test requires the debug version of library");
36 #else
37 QSKIP("This test requires the debug version of library", SkipAll);
34 QSKIP("This test requires the debug version of library", SkipAll);
38 #endif
39 }
35 }
40
36
41 QTEST_MAIN(tst_ChartDataSet)
37 QTEST_MAIN(tst_ChartDataSet)
@@ -32,11 +32,7 private Q_SLOTS:
32
32
33 void tst_Domain::skip()
33 void tst_Domain::skip()
34 {
34 {
35 #ifdef QT5_QUICK_1
36 QSKIP("This test requires the debug version of library");
37 #else
38 QSKIP("This test requires the debug version of library", SkipAll);
35 QSKIP("This test requires the debug version of library", SkipAll);
39 #endif
40 }
36 }
41
37
42 QTEST_MAIN(tst_Domain)
38 QTEST_MAIN(tst_Domain)
@@ -50,20 +50,6 namespace QTest
50 // Some bamboo clients have trouble passing mouse events to the test application.
50 // Some bamboo clients have trouble passing mouse events to the test application.
51 // This can be used to skip those tests so that they don't show up as a failure
51 // This can be used to skip those tests so that they don't show up as a failure
52 // in the test report.
52 // in the test report.
53 #ifdef QT5_QUICK_1
54 #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
55 do { \
56 QPushButton b; \
57 b.resize(100, 100); \
58 b.show(); \
59 QTest::qWaitForWindowShown(&b); \
60 QSignalSpy spy(&b, SIGNAL(clicked())); \
61 QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \
62 if (spy.count() == 0) \
63 QSKIP("Cannot test mouse events in this environment"); \
64 } while (0); \
65 }
66 #else
67 #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
53 #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
68 do { \
54 do { \
69 QPushButton b; \
55 QPushButton b; \
@@ -76,6 +62,5 namespace QTest
76 QSKIP("Cannot test mouse events in this environment", SkipAll); \
62 QSKIP("Cannot test mouse events in this environment", SkipAll); \
77 } while (0); \
63 } while (0); \
78 }
64 }
79 #endif
80
65
81 #endif // TST_DEFINITIONS_H
66 #endif // TST_DEFINITIONS_H
@@ -139,11 +139,7 void tst_QAbstractAxis::axisPenColor_data()
139
139
140 void tst_QAbstractAxis::axisPenColor()
140 void tst_QAbstractAxis::axisPenColor()
141 {
141 {
142 #ifdef QT5_QUICK_1
142 QSKIP("Test is not implemented. This is deprecated function", SkipAll);
143 QSKIP("Test is not implemented. This is depreciated function");
144 #else
145 QSKIP("Test is not implemented. This is depreciated function", SkipAll);
146 #endif
147 }
143 }
148
144
149 void tst_QAbstractAxis::gridLinePen_data()
145 void tst_QAbstractAxis::gridLinePen_data()
@@ -408,11 +404,7 void tst_QAbstractAxis::labelsColor_data()
408
404
409 void tst_QAbstractAxis::labelsColor()
405 void tst_QAbstractAxis::labelsColor()
410 {
406 {
411 #ifdef QT5_QUICK_1
407 QSKIP("Test is not implemented. This is deprecated function", SkipAll);
412 QSKIP("Test is not implemented. This is depreciated function");
413 #else
414 QSKIP("Test is not implemented. This is depreciated function", SkipAll);
415 #endif
416 }
408 }
417
409
418 void tst_QAbstractAxis::labelsFont_data()
410 void tst_QAbstractAxis::labelsFont_data()
@@ -637,11 +629,7 void tst_QAbstractAxis::shadesBorderColor_data()
637
629
638 void tst_QAbstractAxis::shadesBorderColor()
630 void tst_QAbstractAxis::shadesBorderColor()
639 {
631 {
640 #ifdef QT5_QUICK_1
632 QSKIP("Test is not implemented. This is deprecated function", SkipAll);
641 QSKIP("Test is not implemented. This is depreciated function");
642 #else
643 QSKIP("Test is not implemented. This is depreciated function", SkipAll);
644 #endif
645 }
633 }
646
634
647 void tst_QAbstractAxis::shadesBrush_data()
635 void tst_QAbstractAxis::shadesBrush_data()
@@ -691,11 +679,7 void tst_QAbstractAxis::shadesColor_data()
691 // public QColor shadesColor() const
679 // public QColor shadesColor() const
692 void tst_QAbstractAxis::shadesColor()
680 void tst_QAbstractAxis::shadesColor()
693 {
681 {
694 #ifdef QT5_QUICK_1
682 QSKIP("Test is not implemented. This is deprecated function", SkipAll);
695 QSKIP("Test is not implemented. This is depreciated function");
696 #else
697 QSKIP("Test is not implemented. This is depreciated function", SkipAll);
698 #endif
699 }
683 }
700
684
701 void tst_QAbstractAxis::shadesPen_data()
685 void tst_QAbstractAxis::shadesPen_data()
@@ -2,8 +2,4
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qml.cpp
4 SOURCES += tst_qml.cpp
5 greaterThan(QT_MAJOR_VERSION, 4) {
6 QT += quick1
7 } else {
8 QT += declarative
5 QT += declarative
9 }
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
@@ -12,15 +12,9
12
12
13 #include <QtCore/QDir>
13 #include <QtCore/QDir>
14 #include <QtCore/QFileInfo>
14 #include <QtCore/QFileInfo>
15 #ifdef QT5_QUICK_1
16 #include <QtQuick1/QDeclarativeComponent>
17 #include <QtQuick1/QDeclarativeEngine>
18 #include <QtQuick1/QDeclarativeContext>
19 #else
20 #include <QtDeclarative/QDeclarativeComponent>
15 #include <QtDeclarative/QDeclarativeComponent>
21 #include <QtDeclarative/QDeclarativeEngine>
16 #include <QtDeclarative/QDeclarativeEngine>
22 #include <QtDeclarative/QDeclarativeContext>
17 #include <QtDeclarative/QDeclarativeContext>
23 #endif
24 #include <QApplication>
18 #include <QApplication>
25
19
26 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
20 #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -11,11 +11,7
11 #ifndef QMLAPPLICATIONVIEWER_H
11 #ifndef QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
12 #define QMLAPPLICATIONVIEWER_H
13
13
14 #ifdef QT5_QUICK_1
15 #include <QtQuick1/QDeclarativeView>
16 #else
17 #include <QtDeclarative/QDeclarativeView>
14 #include <QtDeclarative/QDeclarativeView>
18 #endif
19
15
20 class QmlApplicationViewer : public QDeclarativeView
16 class QmlApplicationViewer : public QDeclarativeView
21 {
17 {
@@ -1,8 +1,4
1 greaterThan(QT_MAJOR_VERSION, 4) {
2 QT += quick1
3 } else {
4 QT += declarative
1 QT += declarative
5 }
6
2
7 SOURCES += $$PWD/qmlapplicationviewer.cpp
3 SOURCES += $$PWD/qmlapplicationviewer.cpp
8 HEADERS += $$PWD/qmlapplicationviewer.h
4 HEADERS += $$PWD/qmlapplicationviewer.h
General Comments 0
You need to be logged in to leave comments. Login now