Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create a launcher to be used by all examples and remove old main.cpp …

…files

Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
  • Loading branch information...
commit a88ecf9c6b4d4ef842b0c5456d2d57bdbfcc26c5 1 parent d471aa6
Roger Zanoni rogerzanoni authored

Showing 25 changed files with 62 additions and 479 deletions. Show diff stats Hide diff stats

  1. +4 2 examples/animated_layer/animated_layer.pro
  2. +4 2 examples/box2dpolygon_circle/box2dpolygon_circle.pro
  3. +0 41 examples/box2dpolygon_circle/main.cpp
  4. +4 2 examples/box2dscene/box2dscene.pro
  5. +0 41 examples/box2dscene/main.cpp
  6. +4 2 examples/gamescene/gamescene.pro
  7. +0 41 examples/gamescene/main.cpp
  8. +0 2  examples/gamewindow/GameWindow.qml
  9. +4 2 examples/gamewindow/gamewindow.pro
  10. +0 41 examples/gamewindow/main.cpp
  11. +14 2 examples/{animated_layer → launcher}/main.cpp
  12. +0 41 examples/manysprites/main.cpp
  13. +4 2 examples/manysprites/manysprites.pro
  14. +0 41 examples/movement/main.cpp
  15. +4 2 examples/movement/movement.pro
  16. +0 41 examples/parallax_layers/main.cpp
  17. +4 2 examples/parallax_layers/parallax_layers.pro
  18. +0 41 examples/simplecollision/main.cpp
  19. +4 2 examples/simplecollision/simplecollision.pro
  20. +0 41 examples/sprite/main.cpp
  21. +4 2 examples/sprite/sprite.pro
  22. +0 41 examples/static_layer/main.cpp
  23. +4 2 examples/static_layer/static_layer.pro
  24. +0 41 examples/updateInterval/main.cpp
  25. +4 2 examples/updateInterval/updateInterval.pro
6 examples/animated_layer/animated_layer.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = animated_layer
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
6 examples/box2dpolygon_circle/box2dpolygon_circle.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = box2dpolygon_circle
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/box2dpolygon_circle/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/box2dscene/box2dscene.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = box2dscene
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/box2dscene/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/gamescene/gamescene.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = gamescene
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/gamescene/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
2  examples/gamewindow/GameWindow.qml
@@ -28,8 +28,6 @@ QuasiGame {
28 28 width: 400
29 29 height: 250
30 30
31   - onUpdate: console.log("update", delta)
32   -
33 31 Component.onCompleted: {
34 32 console.log("fps", game.fps)
35 33 }
6 examples/gamewindow/gamewindow.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = gamewindow
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/gamewindow/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
16 examples/animated_layer/main.cpp → examples/launcher/main.cpp
@@ -19,18 +19,30 @@
19 19 * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20 20 */
21 21
  22 +#include <QtCore/qglobal.h>
  23 +
  24 +#if QT_VERSION >= 0x050000
22 25 #include <QGuiApplication>
23 26 #include <QQuickView>
24   -#include <QDeclarativeEngine>
  27 +#else
  28 +#include <QtGui/QApplication>
  29 +#include <QtDeclarative/QDeclarativeView>
  30 +#endif
  31 +
25 32 #include <QDir>
  33 +#include <QDeclarativeEngine>
26 34
27 35 int main(int argc, char *argv[]) {
28 36 QByteArray data = "1";
29 37 qputenv("QML_IMPORT_TRACE", data);
30 38
  39 +#if QT_VERSION >= 0x050000
31 40 QGuiApplication app(argc, argv);
32   -
33 41 QQuickView view;
  42 +#else
  43 + QApplication app(argc, argv);
  44 + QDeclarativeView view;
  45 +#endif
34 46
35 47 view.engine()->addImportPath("../../imports");
36 48
41 examples/manysprites/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/manysprites/manysprites.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = manysprites
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/movement/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/movement/movement.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = movement
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/parallax_layers/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/parallax_layers/parallax_layers.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = parallax_layers
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/simplecollision/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/simplecollision/simplecollision.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = simplecollision
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/sprite/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/sprite/sprite.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = sprite
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/static_layer/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/static_layer/static_layer.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = static_layer
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp
41 examples/updateInterval/main.cpp
... ... @@ -1,41 +0,0 @@
1   -/**
2   - * Copyright (C) 2012 by INdT
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU Lesser General Public License
6   - * as published by the Free Software Foundation; either version 2
7   - * of the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU Lesser General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17   - *
18   - * @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
19   - * @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
20   - */
21   -
22   -#include <QGuiApplication>
23   -#include <QQuickView>
24   -#include <QDeclarativeEngine>
25   -#include <QDir>
26   -
27   -int main(int argc, char *argv[]) {
28   - QByteArray data = "1";
29   - qputenv("QML_IMPORT_TRACE", data);
30   -
31   - QGuiApplication app(argc, argv);
32   -
33   - QQuickView view;
34   -
35   - view.engine()->addImportPath("../../imports");
36   -
37   - view.setSource(QUrl::fromLocalFile("GameWindow.qml"));
38   - view.show();
39   -
40   - return app.exec();
41   -}
6 examples/updateInterval/updateInterval.pro
... ... @@ -1,9 +1,11 @@
1 1 CONFIG += qt
2   -QT += quick
  2 +
  3 +contains(QT_VERSION, ^5.*) QT += quick
  4 +else: QT += declarative
3 5
4 6 TEMPLATE = app
5 7 TARGET = updateInterval
6 8 DEPENDPATH += .
7 9 INCLUDEPATH += .
8 10
9   -SOURCES += main.cpp
  11 +SOURCES += ../launcher/main.cpp

0 comments on commit a88ecf9

Please sign in to comment.
Something went wrong with that request. Please try again.