summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2012-02-29 10:15:01 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-23 06:10:59 +0100
commit907b9b08026838bd59643a748231aca2069cf930 (patch)
tree8e060ff73cd741f8f8a093e7ab79370686acbd3e
parentef7aa31629b1455a479fc6e3b28d89a9da60ef8f (diff)
Refactor packaging and deployment.
Updating Qt3D's packaging and deployment: remove some platform specific packaging references. These can be hidden away in the build scripts for those platforms and do no need to be in the generic package logic. To support this approach begin fixing qmlres and the main.cpp's. Fix and streamline the pkg.pri file, and add some much needed comments. Note that this change *will* break current packaging scripts - those can need to be fixed in seperate commits. Change-Id: I05c2081f61b91bc91673668f6e423a206ac026d5 Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
-rw-r--r--demos/quick3d/flickr3d/flickr3d.pro6
-rw-r--r--demos/quick3d/flickr3d/main.cpp7
-rw-r--r--demos/quick3d/qmlres.h150
-rw-r--r--demos/quick3d/robo_bounce/main.cpp7
-rw-r--r--demos/quick3d/robo_bounce/robo_bounce.pro10
-rw-r--r--demos/quick3d/robo_bounce/robo_bounce.qrc35
-rw-r--r--demos/quick3d/tea_service/main.cpp7
-rw-r--r--demos/quick3d/tea_service/tea_service.pro5
-rw-r--r--examples/qt3d/basket/basket.pro2
-rw-r--r--examples/quick3d/animations/animations.pro6
-rw-r--r--examples/quick3d/animations/main.cpp7
-rw-r--r--examples/quick3d/basket/basket.pro9
-rw-r--r--examples/quick3d/basket/main.cpp7
-rw-r--r--examples/quick3d/cube/cube.pro6
-rw-r--r--examples/quick3d/cube/main.cpp7
-rw-r--r--examples/quick3d/forest/forest.pro9
-rw-r--r--examples/quick3d/forest/forest.qrc10
-rw-r--r--examples/quick3d/forest/main.cpp7
-rw-r--r--examples/quick3d/lander/lander.pro6
-rw-r--r--examples/quick3d/lander/main.cpp7
-rw-r--r--examples/quick3d/matrix_animation/main.cpp7
-rw-r--r--examples/quick3d/matrix_animation/matrix_animation.pro6
-rw-r--r--examples/quick3d/monkeygod/main.cpp7
-rw-r--r--examples/quick3d/monkeygod/monkeygod.pro2
-rw-r--r--examples/quick3d/moon/main.cpp7
-rw-r--r--examples/quick3d/moon/moon.pro6
-rw-r--r--examples/quick3d/photoroom/main.cpp7
-rw-r--r--examples/quick3d/photoroom/photoroom.pro6
-rw-r--r--examples/quick3d/shaders/main.cpp8
-rw-r--r--examples/quick3d/shaders/shaders.pro6
-rw-r--r--examples/quick3d/solarsystem_qml/mt.qml52
-rw-r--r--examples/quick3d/solarsystem_qml/qml/SolarSystem.qml (renamed from examples/quick3d/solarsystem_qml/qml/solarsystem_qml.qml)0
-rw-r--r--examples/quick3d/solarsystem_qml/qml/desktop.qml52
-rw-r--r--examples/quick3d/solarsystem_qml/qtquick3d.icobin0 -> 51262 bytes
-rw-r--r--examples/quick3d/sphere/main.cpp8
-rw-r--r--examples/quick3d/sphere/sphere.pro6
-rw-r--r--pkg.pri111
-rw-r--r--src/quick3d/qmlres.cpp (renamed from examples/quick3d/qmlres.h)73
-rw-r--r--src/quick3d/qmlres.h59
-rw-r--r--src/quick3d/qquickanimation3d.h2
-rw-r--r--src/quick3d/qquickeffect.cpp4
-rw-r--r--src/quick3d/quick3d.pri7
-rw-r--r--src/quick3d/quick3d.pro10
-rw-r--r--src/threed/viewing/qglmockview_p.h11
-rw-r--r--src/threed/viewing/qglview.cpp4
-rw-r--r--tests/auto/qml3d/qml3d.pro1
-rw-r--r--tests/manual/animations/animations.pro19
-rw-r--r--tests/manual/animations/info.json6
-rw-r--r--tests/manual/animations/main.cpp7
-rw-r--r--tests/manual/animations/mt.qml2
-rw-r--r--tests/manual/animations/qml/TestAnimations.qml (renamed from tests/manual/animations/qml/tst_animations.qml)41
-rw-r--r--tests/manual/animations/qml/TestCase.qml8
-rw-r--r--tests/manual/animations/qml/desktop.qml2
-rw-r--r--tests/manual/background/background.pro19
-rw-r--r--tests/manual/background/info.json13
-rw-r--r--tests/manual/background/main.cpp7
-rw-r--r--tests/manual/background/mt.qml52
-rw-r--r--tests/manual/background/qml/TestBackground.qml (renamed from tests/manual/background/qml/tst_background.qml)7
-rw-r--r--tests/manual/background/qml/desktop.qml52
-rw-r--r--tests/manual/basic/basic.pro18
-rw-r--r--tests/manual/basic/info.json13
-rw-r--r--tests/manual/basic/main.cpp7
-rw-r--r--tests/manual/basic/mt.qml52
-rw-r--r--tests/manual/basic/qml/TestBasic.qml (renamed from tests/manual/basic/qml/tst_basic.qml)0
-rw-r--r--tests/manual/basic/qml/desktop.qml52
-rw-r--r--tests/manual/displaymodel/displaymodel.pro24
-rw-r--r--tests/manual/displaymodel/info.json6
-rw-r--r--tests/manual/displaymodel/main.cpp7
-rw-r--r--tests/manual/displaymodel/mt.qml2
-rw-r--r--tests/manual/displaymodel/qml/TestDisplayModel.qml (renamed from tests/manual/displaymodel/qml/tst_displaymodel.qml)0
-rw-r--r--tests/manual/displaymodel/qml/desktop.qml2
-rw-r--r--tests/manual/fullreferencing/fullreferencing.pro22
-rw-r--r--tests/manual/fullreferencing/info.json13
-rw-r--r--tests/manual/fullreferencing/main.cpp7
-rw-r--r--tests/manual/fullreferencing/mt.qml52
-rw-r--r--tests/manual/fullreferencing/qml/TestFullReferencing.qml (renamed from tests/manual/fullreferencing/qml/tst_fullreferencing.qml)0
-rw-r--r--tests/manual/fullreferencing/qml/desktop.qml52
-rw-r--r--tests/manual/model3ds/info.json6
-rw-r--r--tests/manual/model3ds/main.cpp7
-rw-r--r--tests/manual/model3ds/model3ds.pro25
-rw-r--r--tests/manual/model3ds/model3ds.qrc10
-rw-r--r--tests/manual/model3ds/mt.qml2
-rw-r--r--tests/manual/model3ds/qml/TestModel3ds.qml (renamed from tests/manual/model3ds/qml/tst_model3ds.qml)0
-rw-r--r--tests/manual/model3ds/qml/desktop.qml2
-rw-r--r--tests/manual/navigation1/info.json6
-rw-r--r--tests/manual/navigation1/main.cpp7
-rw-r--r--tests/manual/navigation1/mt.qml2
-rw-r--r--tests/manual/navigation1/navigation1.pro21
-rw-r--r--tests/manual/navigation1/qml/TestNavigation1.qml (renamed from tests/manual/navigation1/qml/tst_navigation1.qml)0
-rw-r--r--tests/manual/navigation1/qml/desktop.qml2
-rw-r--r--tests/manual/qrc/main.cpp4
-rw-r--r--tests/manual/qrc/qml/tst_qrc.qml (renamed from tests/manual/qrc/qml/cube.qml)0
-rw-r--r--tests/manual/qrc/qrc.pro13
-rw-r--r--tests/manual/qrc/qrc.qrc6
-rw-r--r--tests/manual/rotation/info.json6
-rw-r--r--tests/manual/rotation/main.cpp7
-rw-r--r--tests/manual/rotation/mt.qml2
-rw-r--r--tests/manual/rotation/qml/TestRotation.qml (renamed from tests/manual/rotation/qml/tst_rotation.qml)0
-rw-r--r--tests/manual/rotation/qml/desktop.qml2
-rw-r--r--tests/manual/rotation/rotation.pro18
-rw-r--r--tests/manual/scaling/info.json6
-rw-r--r--tests/manual/scaling/main.cpp7
-rw-r--r--tests/manual/scaling/mt.qml2
-rw-r--r--tests/manual/scaling/qml/TestScaling.qml (renamed from tests/manual/scaling/qml/tst_scaling.qml)0
-rw-r--r--tests/manual/scaling/qml/desktop.qml2
-rw-r--r--tests/manual/scaling/scaling.pro18
-rw-r--r--tests/manual/shapes/info.json13
-rw-r--r--tests/manual/shapes/main.cpp7
-rw-r--r--tests/manual/shapes/mt.qml52
-rw-r--r--tests/manual/shapes/qml/TestShapes.qml (renamed from tests/manual/shapes/qml/tst_shapes.qml)0
-rw-r--r--tests/manual/shapes/qml/desktop.qml52
-rw-r--r--tests/manual/shapes/shapes.pro18
-rw-r--r--tests/manual/shapes/tst_shapes_qml.desktop7
-rw-r--r--tests/manual/submesh/info.json6
-rw-r--r--tests/manual/submesh/main.cpp7
-rw-r--r--tests/manual/submesh/mt.qml2
-rw-r--r--tests/manual/submesh/qml/TestSubmesh.qml (renamed from tests/manual/submesh/qml/tst_submesh.qml)0
-rw-r--r--tests/manual/submesh/qml/desktop.qml2
-rw-r--r--tests/manual/submesh/submesh.pro21
-rw-r--r--tests/manual/transformations/info.json6
-rw-r--r--tests/manual/transformations/main.cpp7
-rw-r--r--tests/manual/transformations/mt.qml2
-rw-r--r--tests/manual/transformations/qml/TestTransformations.qml (renamed from tests/manual/transformations/qml/tst_transformations.qml)0
-rw-r--r--tests/manual/transformations/qml/desktop.qml2
-rw-r--r--tests/manual/transformations/transformations.pro20
-rw-r--r--tests/manual/translation/info.json6
-rw-r--r--tests/manual/translation/main.cpp7
-rw-r--r--tests/manual/translation/mt.qml2
-rw-r--r--tests/manual/translation/qml/TestTranslation.qml (renamed from tests/manual/translation/qml/tst_translation.qml)0
-rw-r--r--tests/manual/translation/qml/desktop.qml2
-rw-r--r--tests/manual/translation/translation.pro21
-rw-r--r--tests/shared/qmlres.h150
-rw-r--r--tutorials/quick3d/qmlres.h130
-rw-r--r--tutorials/quick3d/shadertut/main.cpp7
-rw-r--r--tutorials/quick3d/shadertut/mt.qml52
-rw-r--r--tutorials/quick3d/shadertut/qml/ShaderTutorial.qml (renamed from tutorials/quick3d/shadertut/qml/shader-tutorial.qml)5
-rw-r--r--tutorials/quick3d/shadertut/qml/desktop.qml52
-rw-r--r--tutorials/quick3d/shadertut/qml/qtlogo.pngbin0 -> 13923 bytes
-rw-r--r--tutorials/quick3d/shadertut/qtquick3d.icobin0 -> 51262 bytes
-rw-r--r--tutorials/quick3d/shadertut/shadertut.pro19
-rw-r--r--tutorials/quick3d/shadertut/shadertut.rc1
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/main.cpp25
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/mt.qml52
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/qml/TeapotBounce.qml (renamed from tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml)2
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/qml/desktop.qml52
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/qml/meshes/teapot.bez (renamed from tutorials/quick3d/teapot_bounce_qml/qml/teapot.bez)0
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/qtquick3d.icobin0 -> 51262 bytes
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro24
-rw-r--r--tutorials/quick3d/teapot_qml/main.cpp25
-rw-r--r--tutorials/quick3d/teapot_qml/mt.qml52
-rw-r--r--tutorials/quick3d/teapot_qml/qml/Teapot.qml (renamed from tutorials/quick3d/teapot_qml/qml/teapot.qml)0
-rw-r--r--tutorials/quick3d/teapot_qml/qml/desktop.qml52
-rw-r--r--tutorials/quick3d/teapot_qml/qml/meshes/teapot.bez (renamed from tutorials/quick3d/teapot_qml/qml/teapot.bez)0
-rw-r--r--tutorials/quick3d/teapot_qml/qtquick3d.icobin0 -> 51262 bytes
-rw-r--r--tutorials/quick3d/teapot_qml/teapot_qml.pro25
155 files changed, 1651 insertions, 855 deletions
diff --git a/demos/quick3d/flickr3d/flickr3d.pro b/demos/quick3d/flickr3d/flickr3d.pro
index ddecd9b30..15348a2e2 100644
--- a/demos/quick3d/flickr3d/flickr3d.pro
+++ b/demos/quick3d/flickr3d/flickr3d.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = flickr3d
-QT += qml quick
+QT += qml quick 3dquick
CONFIG += qt warn_on
SOURCES += main.cpp
@@ -23,10 +23,8 @@ QML_INFRA_FILES = \
CATEGORY = demos
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
flickr3d.rc \
$$QML_INFRA_FILES
diff --git a/demos/quick3d/flickr3d/main.cpp b/demos/quick3d/flickr3d/main.cpp
index 85fb4e0e7..c6cd39892 100644
--- a/demos/quick3d/flickr3d/main.cpp
+++ b/demos/quick3d/flickr3d/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "demos", argc, argv);
+}
diff --git a/demos/quick3d/qmlres.h b/demos/quick3d/qmlres.h
deleted file mode 100644
index 7d9ca3c0b..000000000
--- a/demos/quick3d/qmlres.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLRES_H
-#define QMLRES_H
-
-#include <QtCore/qdir.h>
-#include <QtGui/QGuiApplication>
-#include <QtQuick/QQuickView>
-
-#include <QtCore/qdebug.h>
-
-#define internal_xstr(s) internal_str(s)
-#define internal_str(s) #s
-
-/*!
- \internal
- Returns a string with the path to qml resources, including qml sources,
- 3D assets and textures. The path depends on the platform, and (for
- some platforms) whether it was installed from a package or is being run
- in a development setting.
-*/
-static QString q_get_qmldir(const QString &name)
-{
- QString qml = name;
- // try for a Linux package install first
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifdef QT3D_USE_OPT
- QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/demos"));
-#endif
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/demos"));
-#endif
- QString app = QCoreApplication::applicationFilePath();
- app = app.section(QDir::separator(), -1);
- if (pkgdir.cd(app) && pkgdir.exists())
- {
- qml = pkgdir.filePath(qml);
- }
- else
- {
- // failing that try Mac (pkg & dev) next
- QDir dir(QCoreApplication::applicationDirPath());
- if (dir.path().endsWith(QLatin1String("MacOS")))
- {
- if (dir.cdUp() && dir.cd(QLatin1String("Resources"))
- && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- qWarning("Expected app bundle with QML resources!");
- }
- }
- else
- {
- // for Windows (pkg & dev), and for Linux dev expect to find it
- // in a "resources" directory next to the binary
- if (dir.cd(QLatin1String("resources")) && dir.exists())
- {
- QString app = QCoreApplication::applicationFilePath();
- app = QDir::toNativeSeparators(app);
- //For windows platforms the "app" filepath should have the .exe extension removed.
- const QString winExtension = ".exe";
- if (app.right(winExtension.length()) == winExtension) {
- app = app.left(app.length() - winExtension.length());
- }
-
- //Grab just the app name itself.
- app = app.section(QDir::separator(), -1);
-
- if (dir.cd(QLatin1String("demos")) && dir.cd(app) && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- QString msg = QLatin1String("demos");
- msg += QDir::separator();
- msg += app;
- qWarning("Expected %s directry with qml resources!", qPrintable(msg));
- }
- }
- }
- }
- return qml;
-}
-
-#define QUICK3D_MAIN(file) \
-int main(int argc, char *argv[]) \
-{ \
- QGuiApplication app(argc, argv); \
- QSurfaceFormat f; \
- f.setSamples(16); \
- QQuickView view; \
- view.setFormat(f); \
- QString qml = q_get_qmldir(QLatin1String(file)); \
- view.setSource(QUrl::fromLocalFile(qml)); \
- if (QGuiApplication::arguments().contains(QLatin1String("-maximize"))) \
- view.showMaximized(); \
- else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen"))) \
- view.showFullScreen(); \
- else \
- view.show(); \
- return app.exec(); \
-} \
-
-
-#endif // QMLRES_H
diff --git a/demos/quick3d/robo_bounce/main.cpp b/demos/quick3d/robo_bounce/main.cpp
index 85fb4e0e7..c6cd39892 100644
--- a/demos/quick3d/robo_bounce/main.cpp
+++ b/demos/quick3d/robo_bounce/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "demos", argc, argv);
+}
diff --git a/demos/quick3d/robo_bounce/robo_bounce.pro b/demos/quick3d/robo_bounce/robo_bounce.pro
index 88cf954d1..c1ebfedea 100644
--- a/demos/quick3d/robo_bounce/robo_bounce.pro
+++ b/demos/quick3d/robo_bounce/robo_bounce.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = robo_bounce
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
ICON_FILE = ../icon.png
@@ -46,16 +46,10 @@ QML_MESHES_FILES = \
CATEGORY = demos
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
RC_FILE = robo_bounce.rc
OTHER_FILES += \
+ mt.qml \
robo_bounce.rc \
$$QML_INFRA_FILES \
$$RC_FILE
-
-RESOURCES += \
- robo_bounce.qrc
-
diff --git a/demos/quick3d/robo_bounce/robo_bounce.qrc b/demos/quick3d/robo_bounce/robo_bounce.qrc
deleted file mode 100644
index 4c0b9a2c9..000000000
--- a/demos/quick3d/robo_bounce/robo_bounce.qrc
+++ /dev/null
@@ -1,35 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/Button.qml</file>
- <file>qml/calculator.js</file>
- <file>qml/Calculator.qml</file>
- <file>qml/desktop.qml</file>
- <file>qml/Display.qml</file>
- <file>qml/PushButton.qml</file>
- <file>qml/qmldir</file>
- <file>qml/QMLPanels.qml</file>
- <file>qml/RoboBounce.qml</file>
- <file>qml/Robot.qml</file>
- <file>qml/TronCube.qml</file>
- <file>qml/meshes/button-.png</file>
- <file>qml/meshes/button-blue.png</file>
- <file>qml/meshes/button-green.png</file>
- <file>qml/meshes/button-purple.png</file>
- <file>qml/meshes/button-red.png</file>
- <file>qml/meshes/button.png</file>
- <file>qml/meshes/calculatorSign.png</file>
- <file>qml/meshes/cubeButton.png</file>
- <file>qml/meshes/display.png</file>
- <file>qml/meshes/hazard.png</file>
- <file>qml/meshes/infobutton.png</file>
- <file>qml/meshes/QML3DSign.png</file>
- <file>qml/meshes/qtlogo.png</file>
- <file>qml/meshes/roboInfo.png</file>
- <file>qml/meshes/roboticArms.3ds</file>
- <file>qml/meshes/roboticBody.3ds</file>
- <file>qml/meshes/roboticHead.3ds</file>
- <file>qml/meshes/rotateButton2.png</file>
- <file>qml/meshes/sQt3D_logo.png</file>
- <file>qml/meshes/tronscape.png</file>
- </qresource>
-</RCC>
diff --git a/demos/quick3d/tea_service/main.cpp b/demos/quick3d/tea_service/main.cpp
index 85fb4e0e7..c6cd39892 100644
--- a/demos/quick3d/tea_service/main.cpp
+++ b/demos/quick3d/tea_service/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "demos", argc, argv);
+}
diff --git a/demos/quick3d/tea_service/tea_service.pro b/demos/quick3d/tea_service/tea_service.pro
index 103adbb8f..d3ef30fa1 100644
--- a/demos/quick3d/tea_service/tea_service.pro
+++ b/demos/quick3d/tea_service/tea_service.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = tea_service
-QT += qml quick
+QT += qml quick 3dquick
CONFIG += qt warn_on
SOURCES += main.cpp
@@ -28,7 +28,4 @@ OTHER_FILES += \
$$QML_INFRA_FILES \
tea_service.rc
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
RC_FILE = tea_service.rc
diff --git a/examples/qt3d/basket/basket.pro b/examples/qt3d/basket/basket.pro
index c96bc4aab..f7cb60232 100644
--- a/examples/qt3d/basket/basket.pro
+++ b/examples/qt3d/basket/basket.pro
@@ -8,6 +8,8 @@ include(../../../pkg.pri)
SOURCES = basketview.cpp main.cpp
HEADERS = basketview.h basket_data.h
+RESOURCES += basket.qrc
+
OTHER_FILES += \
basket.rc
diff --git a/examples/quick3d/animations/animations.pro b/examples/quick3d/animations/animations.pro
index 3ddf387ea..0165164fe 100644
--- a/examples/quick3d/animations/animations.pro
+++ b/examples/quick3d/animations/animations.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = animations_qml
-QT += qml quick
+QT += qml quick 3dquick
CONFIG += qt warn_on
SOURCES += main.cpp
@@ -20,10 +20,8 @@ QML_INFRA_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
animations_qml.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/animations/main.cpp b/examples/quick3d/animations/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/animations/main.cpp
+++ b/examples/quick3d/animations/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/basket/basket.pro b/examples/quick3d/basket/basket.pro
index f01ddb619..49c94a596 100644
--- a/examples/quick3d/basket/basket.pro
+++ b/examples/quick3d/basket/basket.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = basket_qml
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -21,16 +21,9 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
mt.qml \
basket_qml.rc \
$$QML_INFRA_FILES
RC_FILE = basket_qml.rc
-
-RESOURCES += \
- basket.qrc
-
diff --git a/examples/quick3d/basket/main.cpp b/examples/quick3d/basket/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/basket/main.cpp
+++ b/examples/quick3d/basket/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/cube/cube.pro b/examples/quick3d/cube/cube.pro
index 59e34c1b5..c150ac65c 100644
--- a/examples/quick3d/cube/cube.pro
+++ b/examples/quick3d/cube/cube.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = cube_qml
-QT += qml quick
+QT += qml quick 3dquick
CONFIG += qt warn_on
SOURCES += main.cpp
@@ -18,10 +18,8 @@ QML_INFRA_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
cube_qml.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/cube/main.cpp b/examples/quick3d/cube/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/cube/main.cpp
+++ b/examples/quick3d/cube/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/forest/forest.pro b/examples/quick3d/forest/forest.pro
index 577d7c302..1ecbd0a9e 100644
--- a/examples/quick3d/forest/forest.pro
+++ b/examples/quick3d/forest/forest.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = forest_qml
-QT += qml quick
+QT += qml quick 3dquick
CONFIG += qt warn_on
SOURCES += main.cpp
@@ -23,14 +23,9 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
forest.rc \
$$QML_INFRA_FILES
RC_FILE = forest.rc
-
-RESOURCES += \
- forest.qrc
diff --git a/examples/quick3d/forest/forest.qrc b/examples/quick3d/forest/forest.qrc
deleted file mode 100644
index 295c06082..000000000
--- a/examples/quick3d/forest/forest.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/tree.png</file>
- <file>qml/Tree.qml</file>
- <file>qml/Forest.qml</file>
- <file>qml/desktop.qml</file>
- <file>qml/meshes/ground.obj</file>
- <file>qml/meshes/tree.obj</file>
- </qresource>
-</RCC>
diff --git a/examples/quick3d/forest/main.cpp b/examples/quick3d/forest/main.cpp
index 7c47afdef..f68429de2 100644
--- a/examples/quick3d/forest/main.cpp
+++ b/examples/quick3d/forest/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qrc:///qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/lander/lander.pro b/examples/quick3d/lander/lander.pro
index 0ef057ed9..746643376 100644
--- a/examples/quick3d/lander/lander.pro
+++ b/examples/quick3d/lander/lander.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = lander
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -32,10 +32,8 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
lander.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/lander/main.cpp b/examples/quick3d/lander/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/lander/main.cpp
+++ b/examples/quick3d/lander/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/matrix_animation/main.cpp b/examples/quick3d/matrix_animation/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/matrix_animation/main.cpp
+++ b/examples/quick3d/matrix_animation/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/matrix_animation/matrix_animation.pro b/examples/quick3d/matrix_animation/matrix_animation.pro
index 2fcbbed10..e4ba730fd 100644
--- a/examples/quick3d/matrix_animation/matrix_animation.pro
+++ b/examples/quick3d/matrix_animation/matrix_animation.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = matrix_animation
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -21,10 +21,8 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
matrix_animation.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/monkeygod/main.cpp b/examples/quick3d/monkeygod/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/monkeygod/main.cpp
+++ b/examples/quick3d/monkeygod/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/monkeygod/monkeygod.pro b/examples/quick3d/monkeygod/monkeygod.pro
index 04124e206..b2f722658 100644
--- a/examples/quick3d/monkeygod/monkeygod.pro
+++ b/examples/quick3d/monkeygod/monkeygod.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = monkeygod
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
diff --git a/examples/quick3d/moon/main.cpp b/examples/quick3d/moon/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/moon/main.cpp
+++ b/examples/quick3d/moon/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/moon/moon.pro b/examples/quick3d/moon/moon.pro
index 54c90c942..fc859d925 100644
--- a/examples/quick3d/moon/moon.pro
+++ b/examples/quick3d/moon/moon.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = moon
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -18,10 +18,8 @@ QML_INFRA_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
moon.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/photoroom/main.cpp b/examples/quick3d/photoroom/main.cpp
index fa97cd727..f68429de2 100644
--- a/examples/quick3d/photoroom/main.cpp
+++ b/examples/quick3d/photoroom/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/photoroom/photoroom.pro b/examples/quick3d/photoroom/photoroom.pro
index 7008b0cb5..dc53da3ef 100644
--- a/examples/quick3d/photoroom/photoroom.pro
+++ b/examples/quick3d/photoroom/photoroom.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = photoroom
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -27,10 +27,8 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
photoroom.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/shaders/main.cpp b/examples/quick3d/shaders/main.cpp
index db9f64eab..f68429de2 100644
--- a/examples/quick3d/shaders/main.cpp
+++ b/examples/quick3d/shaders/main.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
+#include <qmlres.h>
-#include "../qmlres.h"
-
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/shaders/shaders.pro b/examples/quick3d/shaders/shaders.pro
index 8d7e093eb..6b2ad5acf 100644
--- a/examples/quick3d/shaders/shaders.pro
+++ b/examples/quick3d/shaders/shaders.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = shaders
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -27,10 +27,8 @@ QML_MESHES_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
shaders.rc \
$$QML_INFRA_FILES
diff --git a/examples/quick3d/solarsystem_qml/mt.qml b/examples/quick3d/solarsystem_qml/mt.qml
new file mode 100644
index 000000000..ace6196fa
--- /dev/null
+++ b/examples/quick3d/solarsystem_qml/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ SolarSystem {
+ }
+}
diff --git a/examples/quick3d/solarsystem_qml/qml/solarsystem_qml.qml b/examples/quick3d/solarsystem_qml/qml/SolarSystem.qml
index 1e379d9a3..1e379d9a3 100644
--- a/examples/quick3d/solarsystem_qml/qml/solarsystem_qml.qml
+++ b/examples/quick3d/solarsystem_qml/qml/SolarSystem.qml
diff --git a/examples/quick3d/solarsystem_qml/qml/desktop.qml b/examples/quick3d/solarsystem_qml/qml/desktop.qml
new file mode 100644
index 000000000..7ee166666
--- /dev/null
+++ b/examples/quick3d/solarsystem_qml/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ Sphere {
+ }
+}
diff --git a/examples/quick3d/solarsystem_qml/qtquick3d.ico b/examples/quick3d/solarsystem_qml/qtquick3d.ico
new file mode 100644
index 000000000..b3b85e37b
--- /dev/null
+++ b/examples/quick3d/solarsystem_qml/qtquick3d.ico
Binary files differ
diff --git a/examples/quick3d/sphere/main.cpp b/examples/quick3d/sphere/main.cpp
index db9f64eab..f68429de2 100644
--- a/examples/quick3d/sphere/main.cpp
+++ b/examples/quick3d/sphere/main.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
+#include <qmlres.h>
-#include "../qmlres.h"
-
-QUICK3D_EXAMPLE_MAIN("qml/desktop.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "examples", argc, argv);
+}
diff --git a/examples/quick3d/sphere/sphere.pro b/examples/quick3d/sphere/sphere.pro
index 53a5880c5..0c38da94a 100644
--- a/examples/quick3d/sphere/sphere.pro
+++ b/examples/quick3d/sphere/sphere.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = sphere
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
@@ -17,10 +17,8 @@ QML_INFRA_FILES = \
CATEGORY = examples
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
+ mt.qml \
sphere.rc \
$$QML_INFRA_FILES
diff --git a/pkg.pri b/pkg.pri
index 3dea0d9d1..013ddfbab 100644
--- a/pkg.pri
+++ b/pkg.pri
@@ -1,41 +1,66 @@
-mt {
- desktopfile.files = $${TARGET}.qmlproject info.json
- desktopfile.path = /opt/mt/applications/$$TARGET
- icon.files = $$ICON_FILE
- icon.path = /opt/mt/applications/$$TARGET
- INSTALLS += desktopfile icon
+# This file is an interim measure until deployment becomes more clear for
+# the Qt5 SDK and Qt3D. Read this file in conjunction with the logic in
+# qmlres.cpp. Once Qt5 is stable and deployment is clear this will be
+# removed. Also check the README file.
+
+package {
+ # default install path for packaging qml resources - package case
+ resource_dir = $$[QT_INSTALL_DATA]/qt3d/resources/$$CATEGORY/$${TARGET}
+} else {
+ # if we're not packaging, build all our demos/examples/etc and supporting files
+ # into $BUILD_DIR/bin
+ DESTDIR = ../../../bin
+
+ # default install path for packaging qml resources - developer case
+ resource_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET}
}
-!package: DESTDIR = ../../../bin
+# package the binary wrapper that launches the QML
+package {
+ macx: resource_dir = $$[QT_INSTALL_DATA]/qt3d/$${TARGET}.app/Contents/Resources
+ target.path = $$[QT_INSTALL_DATA]/qt3d
+ INSTALLS += target
+} else {
+ macx: resource_dir = $$DESTDIR/$$QMAKE_BUNDLE/Contents/Resources/qml
+}
+# The QML_INFRA_FILES and QML_MESHES_FILES are both about QML based
+# applications, so we'll install them into QT_INSTALL_DATA instead of
+# QT_INSTALL_BINS
+# QML_INFRA_FILES is used by our quick3d demos and examples to indicate files
+# that are part of the application and should be installed (e.g. qml files,
+# images, meshes etc).
+# This conditional serves two purposes:
+# 1) Set up a qmake extra compiler to copy relevant QML files at build time
+# to allow for a normal "change, make, test" developement cycle
+# 2) Set up appropriate install paths on the same files to use "make install"
+# for building packages
!isEmpty(QML_INFRA_FILES) {
+
# rules to copy files from the *base level* of $$PWD/qml into the right place
package {
copyqmlinfra_install.files = $$QML_INFRA_FILES
- mt {
- copyqmlwrap.files = mt.qml
- copyqmlwrap.path = /opt/mt/applications/$$TARGET
- INSTALLS += copyqmlwrap
- copyqmlinfra_install.path = /opt/mt/applications/$$TARGET/qml
- } else {
- macx {
- copyqmlinfra_install.path = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml
- } else {
- copyqmlinfra_install.path = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml
- }
- }
+ mt: copyqmlinfra_install.files += info.json mt.qml $$ICON_FILE
+ copyqmlinfra_install.path = $$resource_dir/qml
INSTALLS += copyqmlinfra_install
} else {
- macx {
- target_dir = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml
- } else {
- target_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml
- target_dir ~= s,/,$$QMAKE_DIR_SEP,
- }
+ # if we're not packaging, put all our demos/examples and supporting files
+ # into $BUILD_DIR/bin
+ target_dir = $$resource_dir/qml
+ target_dir ~= s,/,$$QMAKE_DIR_SEP,
+ # create extra qmake compiler to copy files across during build step
copyqmlinfra.input = QML_INFRA_FILES
copyqmlinfra.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
- win32: copyqmlinfra.commands = $$QMAKE_CHK_DIR_EXISTS $$target_dir
- copyqmlinfra.commands += $(MKDIR) $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ win32: isEmpty(QMAKE_SH) {
+ # If we are in windows, and not a mingw shell, then the mkdir binary does not handle
+ # the -p switch, and will fail if the directory already exists, so make it subject to
+ # an "exists" test. The parens are necessary otherwise the copy won't occur when the
+ # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS"
+ copyqmlinfra.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_MKDIR $$target_dir) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ } else {
+ # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work
+ copyqmlinfra.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ }
copyqmlinfra.CONFIG += no_link_no_clean
copyqmlinfra.variable_out = POST_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlinfra
@@ -46,28 +71,24 @@ mt {
# rules to copy files from the *base level* of $$PWD/qml/meshes into the right place
package {
copyqmlmeshes_install.files = $$QML_MESHES_FILES
- mt {
- copyqmlmeshes_install.path = /opt/mt/applications/$$TARGET/qml/meshes
- } else {
- macx {
- copyqmlmeshes_install.path = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml/meshes
- } else {
- copyqmlmeshes_install.path = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml/meshes
- }
- }
+ copyqmlmeshes_install.path = $$resource_dir/qml/meshes
INSTALLS += copyqmlmeshes_install
} else {
- macx {
- target_dir = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml/meshes
- } else {
- target_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml/meshes
- target_dir ~= s,/,$$QMAKE_DIR_SEP,
- }
+ target_dir = $$resource_dir/qml/meshes
+ target_dir ~= s,/,$$QMAKE_DIR_SEP,
copyqmlmeshes.input = QML_MESHES_FILES
copyqmlmeshes.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
- win32: copyqmlmeshes.commands = $$QMAKE_CHK_DIR_EXISTS $$target_dir
- copyqmlmeshes.commands += $(MKDIR) $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- copyqmlmeshes.CONFIG += no_link_no_cle:qan
+ win32: isEmpty(QMAKE_SH) {
+ # If we are in windows, and not a mingw shell, then the mkdir binary does not handle
+ # the -p switch, and will fail if the directory already exists, so make it subject to
+ # an "exists" test. The parens are necessary otherwise the copy won't occur when the
+ # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS"
+ copyqmlmeshes.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_MKDIR $$target_dir) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ } else {
+ # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work
+ copyqmlmeshes.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ }
+ copyqmlmeshes.CONFIG += no_link_no_clean
copyqmlmeshes.variable_out = POST_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlmeshes
}
diff --git a/examples/quick3d/qmlres.h b/src/quick3d/qmlres.cpp
index 4b0354b3f..cfa9b1dca 100644
--- a/examples/quick3d/qmlres.h
+++ b/src/quick3d/qmlres.cpp
@@ -38,8 +38,7 @@
**
****************************************************************************/
-#ifndef QMLRES_H
-#define QMLRES_H
+#include <qmlres.h>
#include <QtCore/qdir.h>
@@ -48,6 +47,7 @@
#include <QtCore/qdebug.h>
+// stringification hack
#define internal_xstr(s) internal_str(s)
#define internal_str(s) #s
@@ -57,20 +57,25 @@
3D assets and textures. The path depends on the platform, and (for
some platforms) whether it was installed from a package or is being run
in a development setting.
+
+ Note that currently this function is static to this file, is not exported
+ and should not be used or relied on anywhere else but in the examples
+ that ship with Qt3D.
*/
-static QString q_get_qmldir(const QString &name)
+static QString q_get_qmldir(const QString &name, const QString &category)
{
QString qml = name;
// try for a Linux package install first
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifdef QT3D_USE_OPT
- QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
+#ifdef QT3D_QML_DEPLOY_DIR
+ QString pkgdirName(QLatin1String(internal_xstr(QT3D_QML_DEPLOY_DIR) ));
#else
- QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
+ QString pkgdirName(QLatin1String("/usr/share/qt5/qt3d/"));
#endif
#else
- QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
+ QString pkgdirName(QLatin1String("/usr/share/qt4/qt3d/"));
#endif
+ QDir pkgdir(pkgdirName.append(category));
QString app = QCoreApplication::applicationFilePath();
app = app.section(QDir::separator(), -1);
if (pkgdir.cd(app) && pkgdir.exists())
@@ -101,7 +106,7 @@ static QString q_get_qmldir(const QString &name)
{
app = QDir::toNativeSeparators(app);
//For windows platforms the "app" filepath should have the .exe extension removed.
- const QString winExtension = ".exe";
+ const QString winExtension(QLatin1String(".exe"));
if (app.right(winExtension.length()) == winExtension) {
app = app.left(app.length() - winExtension.length());
}
@@ -109,16 +114,16 @@ static QString q_get_qmldir(const QString &name)
//Grab just the app name itself.
app = app.section(QDir::separator(), -1);
- if (dir.cd(QLatin1String("examples")) && dir.cd(app) && dir.exists())
+ if (dir.cd(category) && dir.cd(app) && dir.exists())
{
qml = dir.filePath(qml);
}
else
{
- QString msg = QLatin1String("examples");
+ QString msg = category;
msg += QDir::separator();
msg += app;
- qWarning("Expected %s directry with qml resources!", qPrintable(msg));
+ qWarning("Expected %s directory with qml resources!", qPrintable(msg));
}
}
}
@@ -126,24 +131,32 @@ static QString q_get_qmldir(const QString &name)
return qml;
}
-#define QUICK3D_EXAMPLE_MAIN(file) \
-int main(int argc, char *argv[]) \
-{ \
- QGuiApplication app(argc, argv); \
- QSurfaceFormat f; \
- f.setSamples(16); \
- QQuickView view; \
- view.setFormat(f); \
- QString qml = q_get_qmldir(QLatin1String("qml/desktop.qml")); \
- view.setSource(QUrl::fromLocalFile(qml)); \
- if (QGuiApplication::arguments().contains(QLatin1String("-maximize"))) \
- view.showMaximized(); \
- else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen"))) \
- view.showFullScreen(); \
- else \
- view.show(); \
- return app.exec(); \
-} \
+/*!
+ \internal
+
+ This is a standard main function for examples, demos and tutorials that
+ use a C++ wrapper for QML applications. We do this because we cannot
+ use the standard wrapper from Qt Creator as we need to be sure we have a
+ suitable OpenGL render context.
+ This is not for use outside the Qt3D project and will be removed once
+ the Qt5 is stable and deployment targets are better defined for Qt3D.
+*/
+int q_quick3d_main(const char *entryPointQmlFile, const char *category, int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+ QSurfaceFormat f;
+ f.setSamples(16);
+ QQuickView view;
+ view.setFormat(f);
+ QString qml = q_get_qmldir(QLatin1String(entryPointQmlFile), QLatin1String(category));
+ view.setSource(QUrl::fromLocalFile(qml));
+ if (QGuiApplication::arguments().contains(QLatin1String("-maximize")))
+ view.showMaximized();
+ else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen")))
+ view.showFullScreen();
+ else
+ view.show();
+ return app.exec();
+}
-#endif // QMLRES_H
diff --git a/src/quick3d/qmlres.h b/src/quick3d/qmlres.h
new file mode 100644
index 000000000..8b0fabf32
--- /dev/null
+++ b/src/quick3d/qmlres.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLRES_H
+#define QMLRES_H
+
+//
+// W A R N I N G
+// -------------
+//
+// THIS FILE CONTAINS AN UNSUPPORTED INTERNAL API FOR AD-HOC CROSS-PLATFORM
+// AND CROSS-VERSION QML FILE DEPLOYMENT SPECIFIC TO QT3D EXAMPLES, DEMOS &
+// TUTORIALS ONLY.
+//
+// ONCE QML APP DEPLOYMENT FOR QT3D IS STABLE & DEFINED THIS FILE WILL BE
+// REMOVED. DO NOT USE IT IN YOUR APPLICATIONS.
+
+#include <qt3dquickglobal.h>
+
+extern int Q_QT3D_QUICK_EXPORT q_quick3d_main(const char *entryPointQmlFile, const char *category, int argc, char *argv[]);
+
+#endif // QMLRES_H
diff --git a/src/quick3d/qquickanimation3d.h b/src/quick3d/qquickanimation3d.h
index f8080a1bd..5e3b350bf 100644
--- a/src/quick3d/qquickanimation3d.h
+++ b/src/quick3d/qquickanimation3d.h
@@ -44,7 +44,7 @@
#include "qt3dquickglobal.h"
-#include <qqml.h>
+#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
QT_BEGIN_HEADER
diff --git a/src/quick3d/qquickeffect.cpp b/src/quick3d/qquickeffect.cpp
index a2fa61cd3..402a95b87 100644
--- a/src/quick3d/qquickeffect.cpp
+++ b/src/quick3d/qquickeffect.cpp
@@ -47,9 +47,9 @@
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
-#include <QtQml/qqmlengine.h>
+#include <QtQml/QQmlEngine>
+#include <QtQml/QQmlInfo>
-#include <QtQml/qqmlinfo.h>
#include "qglscenenode.h"
/*!
diff --git a/src/quick3d/quick3d.pri b/src/quick3d/quick3d.pri
index f62c137f0..bf64ed0f0 100644
--- a/src/quick3d/quick3d.pri
+++ b/src/quick3d/quick3d.pri
@@ -12,8 +12,8 @@ HEADERS += \
capsulemesh.h \
point.h \
cylindermesh.h \
- spheremesh.h
-
+ spheremesh.h \
+ qmlres.h
SOURCES += \
qquickeffect.cpp \
@@ -24,5 +24,6 @@ SOURCES += \
capsulemesh.cpp \
point.cpp \
cylindermesh.cpp \
- spheremesh.cpp
+ spheremesh.cpp \
+ qmlres.cpp
diff --git a/src/quick3d/quick3d.pro b/src/quick3d/quick3d.pro
index 11dc3f755..e3d4de840 100644
--- a/src/quick3d/quick3d.pro
+++ b/src/quick3d/quick3d.pro
@@ -17,6 +17,16 @@ gcov {
CONFIG += dll warn_on
}
+# Use this define to set a data directory into which QML resources
+# will be deployed and where qmlres.h will search for them
+# If not defined this defaults to /usr/share/qt5/qt3d for Qt5 and
+# to /usr/share/qt4/qt3d for Qt4.
+#
+# eg: qmake CONFIG+=qt3d_qml_deploy_dir=/usr/local/share/qt3d
+qt3d_qml_deploy_dir {
+ DEFINES += QT3D_QML_DEPLOY_DIR=\\\"/usr/local/share/qt3d\\\"
+}
+
include(quick3d.pri)
PUBLIC_HEADERS = $$HEADERS
diff --git a/src/threed/viewing/qglmockview_p.h b/src/threed/viewing/qglmockview_p.h
index a61b39186..084db4659 100644
--- a/src/threed/viewing/qglmockview_p.h
+++ b/src/threed/viewing/qglmockview_p.h
@@ -42,6 +42,17 @@
#ifndef QGLMOCKVIEW_P_H
#define QGLMOCKVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
QT_BEGIN_NAMESPACE
class QOpenGLContext;
diff --git a/src/threed/viewing/qglview.cpp b/src/threed/viewing/qglview.cpp
index e9c07cb75..9eb916bc4 100644
--- a/src/threed/viewing/qglview.cpp
+++ b/src/threed/viewing/qglview.cpp
@@ -159,11 +159,11 @@ QT_BEGIN_NAMESPACE
\row \li \c{-stereo-stretched-bt} \li StretchedBottomTop.
\endtable
- The option can also be supplied in the \c{Quick3D_OPTIONS} environment
+ The option can also be supplied in the \c{QT3D_OPTIONS} environment
variable:
\code
- $ Quick3D_OPTIONS="-stereo-lr" ./cubehouse
+ $ QT3D_OPTIONS="-stereo-lr" ./cubehouse
\endcode
If the application sets the stereo type with setStereoType(),
diff --git a/tests/auto/qml3d/qml3d.pro b/tests/auto/qml3d/qml3d.pro
index 74e55c25d..c2a0220d3 100644
--- a/tests/auto/qml3d/qml3d.pro
+++ b/tests/auto/qml3d/qml3d.pro
@@ -3,7 +3,6 @@ TEMPLATE=app
TARGET=tst_qml3d
CONFIG += warn_on
QT += qml opengl
-QT += qtquick1
SOURCES += tst_qml3d.cpp
DEFINES -= QUICK_TEST_SOURCE_DIR
diff --git a/tests/manual/animations/animations.pro b/tests/manual/animations/animations.pro
index de199280b..6ccf4fe29 100644
--- a/tests/manual/animations/animations.pro
+++ b/tests/manual/animations/animations.pro
@@ -2,8 +2,23 @@ TEMPLATE = app
TARGET = tst_animations
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestCase.qml \
+ qml/TestAnimations.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/animations/info.json b/tests/manual/animations/info.json
index df299625a..0a1ce515f 100644
--- a/tests/manual/animations/info.json
+++ b/tests/manual/animations/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Animations Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.animationstest",
+ "Summary": "Animations Test"
}
}
diff --git a/tests/manual/animations/main.cpp b/tests/manual/animations/main.cpp
index f2b6d3684..6f9e6c158 100644
--- a/tests/manual/animations/main.cpp
+++ b/tests/manual/animations/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_animations.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/animations/mt.qml b/tests/manual/animations/mt.qml
index 943b268a7..1ba603c6b 100644
--- a/tests/manual/animations/mt.qml
+++ b/tests/manual/animations/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestAnimations {
}
}
diff --git a/tests/manual/animations/qml/tst_animations.qml b/tests/manual/animations/qml/TestAnimations.qml
index a8ba5efe7..dfb9a2a9b 100644
--- a/tests/manual/animations/qml/tst_animations.qml
+++ b/tests/manual/animations/qml/TestAnimations.qml
@@ -46,8 +46,7 @@ import Qt3D.Shapes 1.0
// QTBUG-18702
Item {
id: screen
- width: aTestCase.defaultWidth * 3
- height: aTestCase.defaultHeight * 3
+ width: parent.width; height: parent.height
Flow {
anchors.fill: parent
@@ -57,7 +56,7 @@ Item {
text: "Rotation: Z axis\n(Rolling to the left)\nNumberAnimation"
rotationAxis: Qt.vector3d(0,0,1)
rotation: Rotation3D {
- axis: rotationAxis
+ axis: aTestCase.rotationAxis
NumberAnimation on angle {
loops: Animation.Infinite
from: 0
@@ -65,13 +64,21 @@ Item {
duration: 1500
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ aTestCase.visible = false
+ bTestCase.visible = true
+ }
+ }
}
TestCase {
+ id: bTestCase
text: "Rotation: Z axis\n(Rolling to the left)\nRotationAnimation"
rotationAxis: Qt.vector3d(0,0,1)
rotation: Rotation3D {
- axis: rotationAxis
+ axis: bTestCase.rotationAxis
RotationAnimation on angle {
loops: Animation.Infinite
from: 0
@@ -80,13 +87,21 @@ Item {
direction: RotationAnimation.Clockwise
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ bTestCase.visible = false
+ cTestCase.visible = true
+ }
+ }
}
TestCase {
+ id: cTestCase
text: "Rotation: Z axis\n(Rolling to the left)\nSmoothedAnimation"
rotationAxis: Qt.vector3d(0,0,1)
rotation: Rotation3D {
- axis: rotationAxis
+ axis: cTestCase.rotationAxis
SmoothedAnimation on angle {
loops: Animation.Infinite
from: 0
@@ -95,13 +110,21 @@ Item {
velocity: 200
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ cTestCase.visible = false
+ dTestCase.visible = true
+ }
+ }
}
TestCase {
+ id: dTestCase
text: "Rotation: Z axis\n(Rolling to the left)\nSpringAnimation"
rotationAxis: Qt.vector3d(0,0,1)
rotation: Rotation3D {
- axis: rotationAxis
+ axis: dTestCase.rotationAxis
SpringAnimation on angle {
id: rotationAnimation
loops: Animation.Infinite
@@ -112,6 +135,12 @@ Item {
damping: 0.2
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ Qt.quit()
+ }
+ }
}
}
}
diff --git a/tests/manual/animations/qml/TestCase.qml b/tests/manual/animations/qml/TestCase.qml
index 5dde547cb..8285a0d1c 100644
--- a/tests/manual/animations/qml/TestCase.qml
+++ b/tests/manual/animations/qml/TestCase.qml
@@ -47,15 +47,13 @@ Rectangle {
id: container
property string text;
property variant rotationAxis : Qt.vector3d(1,0,0)
- property real defaultWidth: 220
- property real defaultHeight: 150
property variant rotation: Rotation3D {}
border.width: 2
border.color: "black"
radius: 5
- width: defaultWidth
- height: defaultHeight
+ width: parent.width
+ height: parent.height
Text {
id: textItem
wrapMode: "WordWrap"
@@ -76,7 +74,6 @@ Rectangle {
Viewport {
id: view
anchors.fill: parent
- picking: true
camera: Camera { eye: Qt.vector3d(0,15,50)}
Cube
{
@@ -86,4 +83,5 @@ Rectangle {
}
}
}
+ Component.onCompleted: container.visible = false;
}
diff --git a/tests/manual/animations/qml/desktop.qml b/tests/manual/animations/qml/desktop.qml
index 17fc1fa5b..76b93dc50 100644
--- a/tests/manual/animations/qml/desktop.qml
+++ b/tests/manual/animations/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestAnimations {
}
}
diff --git a/tests/manual/background/background.pro b/tests/manual/background/background.pro
index 312c13e2a..958a2080b 100644
--- a/tests/manual/background/background.pro
+++ b/tests/manual/background/background.pro
@@ -1,8 +1,23 @@
TEMPLATE = app
TARGET = tst_background
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestBackground.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES \
+ qml/sky.png
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/background/info.json b/tests/manual/background/info.json
new file mode 100644
index 000000000..21fcdd7e6
--- /dev/null
+++ b/tests/manual/background/info.json
@@ -0,0 +1,13 @@
+{
+ "info-version": "1.0",
+ "dict": {
+ "Category": "application",
+ "Runtime": "qml",
+ "DisplayName": "TestBackground",
+ "Subcategory": "utility",
+ "MainQML": "mt.qml",
+ "Version": "1.0",
+ "Identifier": "com.nokia.qtquick3d.testbackground",
+ "Summary": "TestBackground QML Demo"
+ }
+}
diff --git a/tests/manual/background/main.cpp b/tests/manual/background/main.cpp
index 8f198eff1..6f9e6c158 100644
--- a/tests/manual/background/main.cpp
+++ b/tests/manual/background/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_background.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/background/mt.qml b/tests/manual/background/mt.qml
new file mode 100644
index 000000000..432978343
--- /dev/null
+++ b/tests/manual/background/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ TestBackground {
+ }
+}
diff --git a/tests/manual/background/qml/tst_background.qml b/tests/manual/background/qml/TestBackground.qml
index 3221211c4..ecc705a48 100644
--- a/tests/manual/background/qml/tst_background.qml
+++ b/tests/manual/background/qml/TestBackground.qml
@@ -44,11 +44,14 @@ import Qt3D 1.0
import Qt3D.Shapes 1.0
Image {
+ width: parent.width
+ height: parent.height
+
source: "sky.png"
Viewport {
- width: 640
- height: 480
+ width: parent.width
+ height: parent.height
camera: Camera {
eye: Qt.vector3d(2,5,20);
diff --git a/tests/manual/background/qml/desktop.qml b/tests/manual/background/qml/desktop.qml
new file mode 100644
index 000000000..811b30e7b
--- /dev/null
+++ b/tests/manual/background/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ TestBackground {
+ }
+}
diff --git a/tests/manual/basic/basic.pro b/tests/manual/basic/basic.pro
index bf2107d35..faf2fc31d 100644
--- a/tests/manual/basic/basic.pro
+++ b/tests/manual/basic/basic.pro
@@ -1,8 +1,22 @@
TEMPLATE = app
TARGET = tst_basic
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestBasic.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/basic/info.json b/tests/manual/basic/info.json
new file mode 100644
index 000000000..51f4ac9ac
--- /dev/null
+++ b/tests/manual/basic/info.json
@@ -0,0 +1,13 @@
+{
+ "info-version": "1.0",
+ "dict": {
+ "Category": "application",
+ "Runtime": "qml",
+ "DisplayName": "Basic Test",
+ "Subcategory": "utility",
+ "MainQML": "mt.qml",
+ "Version": "1.0",
+ "Identifier": "com.nokia.qt3d.basicqt3dtest",
+ "Summary": "Basic Qt3D Test"
+ }
+}
diff --git a/tests/manual/basic/main.cpp b/tests/manual/basic/main.cpp
index 6f6a19150..6f9e6c158 100644
--- a/tests/manual/basic/main.cpp
+++ b/tests/manual/basic/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_basic.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/basic/mt.qml b/tests/manual/basic/mt.qml
new file mode 100644
index 000000000..f40620533
--- /dev/null
+++ b/tests/manual/basic/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ TestBasic {
+ }
+}
diff --git a/tests/manual/basic/qml/tst_basic.qml b/tests/manual/basic/qml/TestBasic.qml
index 0b8cdf82f..0b8cdf82f 100644
--- a/tests/manual/basic/qml/tst_basic.qml
+++ b/tests/manual/basic/qml/TestBasic.qml
diff --git a/tests/manual/basic/qml/desktop.qml b/tests/manual/basic/qml/desktop.qml
new file mode 100644
index 000000000..85f03e2b9
--- /dev/null
+++ b/tests/manual/basic/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ TestBasic {
+ }
+}
diff --git a/tests/manual/displaymodel/displaymodel.pro b/tests/manual/displaymodel/displaymodel.pro
index 7b8af235a..b343579f4 100644
--- a/tests/manual/displaymodel/displaymodel.pro
+++ b/tests/manual/displaymodel/displaymodel.pro
@@ -2,8 +2,28 @@ TEMPLATE = app
TARGET = tst_displaymodel
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestDisplayModel.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/monkey.obj \
+ qml/meshes/monkey.mtl \
+ qml/meshes/lunar-lander.3ds \
+ qml/meshes/teapot.bez
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/displaymodel/info.json b/tests/manual/displaymodel/info.json
index df299625a..fa3cb9ca2 100644
--- a/tests/manual/displaymodel/info.json
+++ b/tests/manual/displaymodel/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Display Model Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.displaymodeltest",
+ "Summary": "Display Model Test"
}
}
diff --git a/tests/manual/displaymodel/main.cpp b/tests/manual/displaymodel/main.cpp
index ecdf31c68..6f9e6c158 100644
--- a/tests/manual/displaymodel/main.cpp
+++ b/tests/manual/displaymodel/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_displaymodel.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/displaymodel/mt.qml b/tests/manual/displaymodel/mt.qml
index 943b268a7..a96ad9f73 100644
--- a/tests/manual/displaymodel/mt.qml
+++ b/tests/manual/displaymodel/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestDisplayModel {
}
}
diff --git a/tests/manual/displaymodel/qml/tst_displaymodel.qml b/tests/manual/displaymodel/qml/TestDisplayModel.qml
index b69f3aa50..b69f3aa50 100644
--- a/tests/manual/displaymodel/qml/tst_displaymodel.qml
+++ b/tests/manual/displaymodel/qml/TestDisplayModel.qml
diff --git a/tests/manual/displaymodel/qml/desktop.qml b/tests/manual/displaymodel/qml/desktop.qml
index 17fc1fa5b..2993b5fe4 100644
--- a/tests/manual/displaymodel/qml/desktop.qml
+++ b/tests/manual/displaymodel/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestDisplayModel {
}
}
diff --git a/tests/manual/fullreferencing/fullreferencing.pro b/tests/manual/fullreferencing/fullreferencing.pro
index 7fde3ca0e..da7a1221e 100644
--- a/tests/manual/fullreferencing/fullreferencing.pro
+++ b/tests/manual/fullreferencing/fullreferencing.pro
@@ -1,8 +1,26 @@
TEMPLATE = app
TARGET = tst_fullreferencing
CONFIG += qt warn_on
-QT += qml quick
+QT += qml quick 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestFullReferencing.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/robot.3ds \
+ qml/meshes/hazard.png
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/fullreferencing/info.json b/tests/manual/fullreferencing/info.json
new file mode 100644
index 000000000..dbeb0c86d
--- /dev/null
+++ b/tests/manual/fullreferencing/info.json
@@ -0,0 +1,13 @@
+{
+ "info-version": "1.0",
+ "dict": {
+ "Category": "application",
+ "Runtime": "qml",
+ "DisplayName": "Full Referencing Test",
+ "Subcategory": "utility",
+ "MainQML": "mt.qml",
+ "Version": "1.0",
+ "Identifier": "com.nokia.qt3d.fullreferencingtest",
+ "Summary": "Full Referencing Test QML Demo"
+ }
+}
diff --git a/tests/manual/fullreferencing/main.cpp b/tests/manual/fullreferencing/main.cpp
index ce997a304..6f9e6c158 100644
--- a/tests/manual/fullreferencing/main.cpp
+++ b/tests/manual/fullreferencing/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_fullreferencing.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/fullreferencing/mt.qml b/tests/manual/fullreferencing/mt.qml
new file mode 100644
index 000000000..2f320acb3
--- /dev/null
+++ b/tests/manual/fullreferencing/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ TestFullReferencing {
+ }
+}
diff --git a/tests/manual/fullreferencing/qml/tst_fullreferencing.qml b/tests/manual/fullreferencing/qml/TestFullReferencing.qml
index 391d7742e..391d7742e 100644
--- a/tests/manual/fullreferencing/qml/tst_fullreferencing.qml
+++ b/tests/manual/fullreferencing/qml/TestFullReferencing.qml
diff --git a/tests/manual/fullreferencing/qml/desktop.qml b/tests/manual/fullreferencing/qml/desktop.qml
new file mode 100644
index 000000000..698d7ef69
--- /dev/null
+++ b/tests/manual/fullreferencing/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ TestFullReferencing {
+ }
+}
diff --git a/tests/manual/model3ds/info.json b/tests/manual/model3ds/info.json
index df299625a..caa0dffcc 100644
--- a/tests/manual/model3ds/info.json
+++ b/tests/manual/model3ds/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Model 3ds Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.model3dstest",
+ "Summary": "Model 3ds Test"
}
}
diff --git a/tests/manual/model3ds/main.cpp b/tests/manual/model3ds/main.cpp
index b83220dc8..6f9e6c158 100644
--- a/tests/manual/model3ds/main.cpp
+++ b/tests/manual/model3ds/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_model3ds.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/model3ds/model3ds.pro b/tests/manual/model3ds/model3ds.pro
index 718dc1059..5c6fb61dd 100644
--- a/tests/manual/model3ds/model3ds.pro
+++ b/tests/manual/model3ds/model3ds.pro
@@ -2,8 +2,29 @@ TEMPLATE = app
TARGET = tst_model3ds
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestModel3ds.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/hazard.png \
+ qml/meshes/lunar-lander.3ds \
+ qml/meshes/monkey.3ds \
+ qml/meshes/penguin.3ds \
+ qml/meshes/robot.3ds
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/model3ds/model3ds.qrc b/tests/manual/model3ds/model3ds.qrc
deleted file mode 100644
index 6dbd8edd6..000000000
--- a/tests/manual/model3ds/model3ds.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/tst_model3ds.qml</file>
- <file>qml/meshes/lunar-lander.3ds</file>
- <file>qml/meshes/monkey.3ds</file>
- <file>qml/meshes/penguin.3ds</file>
- <file>qml/meshes/robot.3ds</file>
- <file>qml/meshes/hazard.png</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/model3ds/mt.qml b/tests/manual/model3ds/mt.qml
index 943b268a7..a4cf15b1b 100644
--- a/tests/manual/model3ds/mt.qml
+++ b/tests/manual/model3ds/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestModel3ds {
}
}
diff --git a/tests/manual/model3ds/qml/tst_model3ds.qml b/tests/manual/model3ds/qml/TestModel3ds.qml
index 2dcc42aaa..2dcc42aaa 100644
--- a/tests/manual/model3ds/qml/tst_model3ds.qml
+++ b/tests/manual/model3ds/qml/TestModel3ds.qml
diff --git a/tests/manual/model3ds/qml/desktop.qml b/tests/manual/model3ds/qml/desktop.qml
index 17fc1fa5b..dbd1b8bb0 100644
--- a/tests/manual/model3ds/qml/desktop.qml
+++ b/tests/manual/model3ds/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestModel3ds {
}
}
diff --git a/tests/manual/navigation1/info.json b/tests/manual/navigation1/info.json
index df299625a..4e5832a00 100644
--- a/tests/manual/navigation1/info.json
+++ b/tests/manual/navigation1/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Navigation1 Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.navigation1test",
+ "Summary": "Navigation1 Test"
}
}
diff --git a/tests/manual/navigation1/main.cpp b/tests/manual/navigation1/main.cpp
index 3dc3fbd5e..6f9e6c158 100644
--- a/tests/manual/navigation1/main.cpp
+++ b/tests/manual/navigation1/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_navigation1.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/navigation1/mt.qml b/tests/manual/navigation1/mt.qml
index 943b268a7..df1848f13 100644
--- a/tests/manual/navigation1/mt.qml
+++ b/tests/manual/navigation1/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestNavigation1 {
}
}
diff --git a/tests/manual/navigation1/navigation1.pro b/tests/manual/navigation1/navigation1.pro
index 764f10b87..7d9ff262c 100644
--- a/tests/manual/navigation1/navigation1.pro
+++ b/tests/manual/navigation1/navigation1.pro
@@ -2,8 +2,25 @@ TEMPLATE = app
TARGET = tst_navigation1
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestNavigation1.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/monkey.3ds
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/navigation1/qml/tst_navigation1.qml b/tests/manual/navigation1/qml/TestNavigation1.qml
index 4ec1bf1d1..4ec1bf1d1 100644
--- a/tests/manual/navigation1/qml/tst_navigation1.qml
+++ b/tests/manual/navigation1/qml/TestNavigation1.qml
diff --git a/tests/manual/navigation1/qml/desktop.qml b/tests/manual/navigation1/qml/desktop.qml
index 17fc1fa5b..fbd53c762 100644
--- a/tests/manual/navigation1/qml/desktop.qml
+++ b/tests/manual/navigation1/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestNavigation1 {
}
}
diff --git a/tests/manual/qrc/main.cpp b/tests/manual/qrc/main.cpp
index 12422c1c5..638024103 100644
--- a/tests/manual/qrc/main.cpp
+++ b/tests/manual/qrc/main.cpp
@@ -54,12 +54,12 @@ int main(int argc, char *argv[])
QQuickView viewL(&root);
viewL.setFormat(format);
- viewL.setSource(QUrl("qrc:///qml/cube.qml"));
+ viewL.setSource(QUrl("qrc:///qml/tst_qrc.qml"));
viewL.setGeometry(0, 0, 640, 480);
QQuickView viewR(&root);
viewR.setFormat(format);
- viewR.setSource(QUrl("Qrc:/qml/cube.qml"));
+ viewR.setSource(QUrl("Qrc:///qml/tst_qrc.qml"));
viewR.setGeometry(640, 0, 640, 480);
root.show();
diff --git a/tests/manual/qrc/qml/cube.qml b/tests/manual/qrc/qml/tst_qrc.qml
index cf79dea53..cf79dea53 100644
--- a/tests/manual/qrc/qml/cube.qml
+++ b/tests/manual/qrc/qml/tst_qrc.qml
diff --git a/tests/manual/qrc/qrc.pro b/tests/manual/qrc/qrc.pro
index ead2314d2..88d7baed4 100644
--- a/tests/manual/qrc/qrc.pro
+++ b/tests/manual/qrc/qrc.pro
@@ -2,6 +2,17 @@ TEMPLATE = app
TARGET = tst_qrc
CONFIG += qt warn_on
+# This manual test is to confirm the functionality of running
+# Qt3D QML apps from a Qt resource (or *.qrc) file.
+#
+# There is no point in installing or running this test on
+# platforms which are only ever intended to run QML apps,
+# and also since the point of qrc is that QML is packaged
+# into a resource file (and thus does not require deployment)
+# hence the pkg.pri logic is not included here.
+
+!package: DESTDIR = ../../../bin
+
QT += 3d quick
SOURCES += main.cpp
@@ -9,7 +20,7 @@ SOURCES += main.cpp
INSTALL_DIRS = qml
OTHER_FILES += \
- qml/tst_cube.qml
+ qml/tst_qrc.qml
RESOURCES += \
qrc.qrc
diff --git a/tests/manual/qrc/qrc.qrc b/tests/manual/qrc/qrc.qrc
index 168976b50..f2597b1f6 100644
--- a/tests/manual/qrc/qrc.qrc
+++ b/tests/manual/qrc/qrc.qrc
@@ -1,6 +1,6 @@
<RCC>
- <qresource prefix="/">
- <file>qml/cube.qml</file>
- <file>qml/qtlogo.png</file>
+ <qresource prefix="/qml">
+ <file alias="tst_qrc.qml">qml/tst_qrc.qml</file>
+ <file alias="qtlogo.png">qml/qtlogo.png</file>
</qresource>
</RCC>
diff --git a/tests/manual/rotation/info.json b/tests/manual/rotation/info.json
index df299625a..4ca539c57 100644
--- a/tests/manual/rotation/info.json
+++ b/tests/manual/rotation/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Rotation",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.testrotation",
+ "Summary": "Rotation Test"
}
}
diff --git a/tests/manual/rotation/main.cpp b/tests/manual/rotation/main.cpp
index 2b36cfd17..6f9e6c158 100644
--- a/tests/manual/rotation/main.cpp
+++ b/tests/manual/rotation/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_rotation.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/rotation/mt.qml b/tests/manual/rotation/mt.qml
index 943b268a7..2430cdf4f 100644
--- a/tests/manual/rotation/mt.qml
+++ b/tests/manual/rotation/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestRotation {
}
}
diff --git a/tests/manual/rotation/qml/tst_rotation.qml b/tests/manual/rotation/qml/TestRotation.qml
index 3e338bc38..3e338bc38 100644
--- a/tests/manual/rotation/qml/tst_rotation.qml
+++ b/tests/manual/rotation/qml/TestRotation.qml
diff --git a/tests/manual/rotation/qml/desktop.qml b/tests/manual/rotation/qml/desktop.qml
index 17fc1fa5b..6897fb01b 100644
--- a/tests/manual/rotation/qml/desktop.qml
+++ b/tests/manual/rotation/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestRotation {
}
}
diff --git a/tests/manual/rotation/rotation.pro b/tests/manual/rotation/rotation.pro
index ff99883ca..81893804e 100644
--- a/tests/manual/rotation/rotation.pro
+++ b/tests/manual/rotation/rotation.pro
@@ -2,8 +2,22 @@ TEMPLATE = app
TARGET = tst_rotation
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestRotation.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/scaling/info.json b/tests/manual/scaling/info.json
index df299625a..37c55b0b3 100644
--- a/tests/manual/scaling/info.json
+++ b/tests/manual/scaling/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Scaling Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.scalingtest",
+ "Summary": "Scaling Test"
}
}
diff --git a/tests/manual/scaling/main.cpp b/tests/manual/scaling/main.cpp
index e7de49435..6f9e6c158 100644
--- a/tests/manual/scaling/main.cpp
+++ b/tests/manual/scaling/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_scaling.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/scaling/mt.qml b/tests/manual/scaling/mt.qml
index 943b268a7..500e7d943 100644
--- a/tests/manual/scaling/mt.qml
+++ b/tests/manual/scaling/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestScaling {
}
}
diff --git a/tests/manual/scaling/qml/tst_scaling.qml b/tests/manual/scaling/qml/TestScaling.qml
index cc0bd6293..cc0bd6293 100644
--- a/tests/manual/scaling/qml/tst_scaling.qml
+++ b/tests/manual/scaling/qml/TestScaling.qml
diff --git a/tests/manual/scaling/qml/desktop.qml b/tests/manual/scaling/qml/desktop.qml
index 17fc1fa5b..fe2027f10 100644
--- a/tests/manual/scaling/qml/desktop.qml
+++ b/tests/manual/scaling/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestScaling {
}
}
diff --git a/tests/manual/scaling/scaling.pro b/tests/manual/scaling/scaling.pro
index 2fd9302f2..371fb8fcd 100644
--- a/tests/manual/scaling/scaling.pro
+++ b/tests/manual/scaling/scaling.pro
@@ -2,8 +2,22 @@ TEMPLATE = app
TARGET = tst_scaling
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestScaling.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/shapes/info.json b/tests/manual/shapes/info.json
new file mode 100644
index 000000000..b025068cf
--- /dev/null
+++ b/tests/manual/shapes/info.json
@@ -0,0 +1,13 @@
+{
+ "info-version": "1.0",
+ "dict": {
+ "Category": "application",
+ "Runtime": "qml",
+ "DisplayName": "Shapes Test",
+ "Subcategory": "utility",
+ "MainQML": "mt.qml",
+ "Version": "1.0",
+ "Identifier": "com.nokia.qtquick3d.shapestest",
+ "Summary": "Thing QML Demo"
+ }
+}
diff --git a/tests/manual/shapes/main.cpp b/tests/manual/shapes/main.cpp
index 7d82ed45b..6f9e6c158 100644
--- a/tests/manual/shapes/main.cpp
+++ b/tests/manual/shapes/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_shapes.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/shapes/mt.qml b/tests/manual/shapes/mt.qml
new file mode 100644
index 000000000..aa8eec64c
--- /dev/null
+++ b/tests/manual/shapes/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ TestShapes {
+ }
+}
diff --git a/tests/manual/shapes/qml/tst_shapes.qml b/tests/manual/shapes/qml/TestShapes.qml
index 4c455c3ce..4c455c3ce 100644
--- a/tests/manual/shapes/qml/tst_shapes.qml
+++ b/tests/manual/shapes/qml/TestShapes.qml
diff --git a/tests/manual/shapes/qml/desktop.qml b/tests/manual/shapes/qml/desktop.qml
new file mode 100644
index 000000000..90236926a
--- /dev/null
+++ b/tests/manual/shapes/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ TestShapes {
+ }
+}
diff --git a/tests/manual/shapes/shapes.pro b/tests/manual/shapes/shapes.pro
index 2e1cc6371..a1b0a270b 100644
--- a/tests/manual/shapes/shapes.pro
+++ b/tests/manual/shapes/shapes.pro
@@ -2,8 +2,22 @@ TEMPLATE = app
TARGET = tst_shapes
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestShapes.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/shapes/tst_shapes_qml.desktop b/tests/manual/shapes/tst_shapes_qml.desktop
deleted file mode 100644
index 7bd7fd920..000000000
--- a/tests/manual/shapes/tst_shapes_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_submesh
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_submesh -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_submesh_qml
diff --git a/tests/manual/submesh/info.json b/tests/manual/submesh/info.json
index df299625a..df316a359 100644
--- a/tests/manual/submesh/info.json
+++ b/tests/manual/submesh/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Submesh",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.testsubmesh",
+ "Summary": "Submesh Test"
}
}
diff --git a/tests/manual/submesh/main.cpp b/tests/manual/submesh/main.cpp
index 0805843e1..6f9e6c158 100644
--- a/tests/manual/submesh/main.cpp
+++ b/tests/manual/submesh/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_submesh.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/submesh/mt.qml b/tests/manual/submesh/mt.qml
index 943b268a7..faa53559d 100644
--- a/tests/manual/submesh/mt.qml
+++ b/tests/manual/submesh/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestSubmesh {
}
}
diff --git a/tests/manual/submesh/qml/tst_submesh.qml b/tests/manual/submesh/qml/TestSubmesh.qml
index 854c1a222..854c1a222 100644
--- a/tests/manual/submesh/qml/tst_submesh.qml
+++ b/tests/manual/submesh/qml/TestSubmesh.qml
diff --git a/tests/manual/submesh/qml/desktop.qml b/tests/manual/submesh/qml/desktop.qml
index 17fc1fa5b..332c50ba0 100644
--- a/tests/manual/submesh/qml/desktop.qml
+++ b/tests/manual/submesh/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestSubmesh {
}
}
diff --git a/tests/manual/submesh/submesh.pro b/tests/manual/submesh/submesh.pro
index 56f21eb17..b00b7b256 100644
--- a/tests/manual/submesh/submesh.pro
+++ b/tests/manual/submesh/submesh.pro
@@ -2,8 +2,25 @@ TEMPLATE = app
TARGET = tst_submesh
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/TestSubmesh.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/lunar-lander.3ds
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/transformations/info.json b/tests/manual/transformations/info.json
index df299625a..ff1e6364f 100644
--- a/tests/manual/transformations/info.json
+++ b/tests/manual/transformations/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Transformations",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qtquick3d.transformations",
+ "Summary": "Transformations QML Test"
}
}
diff --git a/tests/manual/transformations/main.cpp b/tests/manual/transformations/main.cpp
index c5855825e..6f9e6c158 100644
--- a/tests/manual/transformations/main.cpp
+++ b/tests/manual/transformations/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_transformations.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/transformations/mt.qml b/tests/manual/transformations/mt.qml
index 943b268a7..65e65d591 100644
--- a/tests/manual/transformations/mt.qml
+++ b/tests/manual/transformations/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestTransformations {
}
}
diff --git a/tests/manual/transformations/qml/tst_transformations.qml b/tests/manual/transformations/qml/TestTransformations.qml
index 61502fb93..61502fb93 100644
--- a/tests/manual/transformations/qml/tst_transformations.qml
+++ b/tests/manual/transformations/qml/TestTransformations.qml
diff --git a/tests/manual/transformations/qml/desktop.qml b/tests/manual/transformations/qml/desktop.qml
index 17fc1fa5b..22c8c5057 100644
--- a/tests/manual/transformations/qml/desktop.qml
+++ b/tests/manual/transformations/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestTransformations {
}
}
diff --git a/tests/manual/transformations/transformations.pro b/tests/manual/transformations/transformations.pro
index c04370b5c..72d870667 100644
--- a/tests/manual/transformations/transformations.pro
+++ b/tests/manual/transformations/transformations.pro
@@ -2,8 +2,24 @@ TEMPLATE = app
TARGET = tst_transformations
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/ComposedItemTransformationsTestCase.qml \
+ qml/TransformationListTestCase.qml \
+ qml/TestTransformations.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/manual/translation/info.json b/tests/manual/translation/info.json
index df299625a..802d5722d 100644
--- a/tests/manual/translation/info.json
+++ b/tests/manual/translation/info.json
@@ -3,11 +3,11 @@
"dict": {
"Category": "application",
"Runtime": "qml",
- "DisplayName": "Thing",
+ "DisplayName": "Translation Test",
"Subcategory": "utility",
"MainQML": "mt.qml",
"Version": "1.0",
- "Identifier": "com.nokia.qt3d.thing",
- "Summary": "Thing QML Demo"
+ "Identifier": "com.nokia.qt3d.translationtest",
+ "Summary": "Translation Test"
}
}
diff --git a/tests/manual/translation/main.cpp b/tests/manual/translation/main.cpp
index 0d4a27e89..6f9e6c158 100644
--- a/tests/manual/translation/main.cpp
+++ b/tests/manual/translation/main.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
-#include "../../shared/qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/tst_translation.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "manual", argc, argv);
+}
diff --git a/tests/manual/translation/mt.qml b/tests/manual/translation/mt.qml
index 943b268a7..7684b68da 100644
--- a/tests/manual/translation/mt.qml
+++ b/tests/manual/translation/mt.qml
@@ -47,6 +47,6 @@ Item {
width: 320
height: 480
- Thing {
+ TestTranslation {
}
}
diff --git a/tests/manual/translation/qml/tst_translation.qml b/tests/manual/translation/qml/TestTranslation.qml
index b3d4ed305..b3d4ed305 100644
--- a/tests/manual/translation/qml/tst_translation.qml
+++ b/tests/manual/translation/qml/TestTranslation.qml
diff --git a/tests/manual/translation/qml/desktop.qml b/tests/manual/translation/qml/desktop.qml
index 17fc1fa5b..7763c52ba 100644
--- a/tests/manual/translation/qml/desktop.qml
+++ b/tests/manual/translation/qml/desktop.qml
@@ -47,6 +47,6 @@ Item {
width: 640
height: 480
- Thing {
+ TestTranslation {
}
}
diff --git a/tests/manual/translation/translation.pro b/tests/manual/translation/translation.pro
index aa2aeb597..d3d734218 100644
--- a/tests/manual/translation/translation.pro
+++ b/tests/manual/translation/translation.pro
@@ -2,8 +2,25 @@ TEMPLATE = app
TARGET = tst_translation
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick
SOURCES += main.cpp
-INSTALL_DIRS = qml
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/AxesVsVectorTestCase.qml \
+ qml/TranslationTestCase.qml \
+ qml/TranslationVectorTestCase.qml \
+ qml/TestTranslation.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+CATEGORY = manual
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ $$QML_INFRA_FILES
diff --git a/tests/shared/qmlres.h b/tests/shared/qmlres.h
deleted file mode 100644
index ab03fdb75..000000000
--- a/tests/shared/qmlres.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef QMLRES_H
-#define QMLRES_H
-
-#include <QDir>
-#include <QGuiApplication>
-#include <QtQuick/QQuickView>
-
-#include <QDebug>
-
-#define internal_xstr(s) internal_str(s)
-#define internal_str(s) #s
-
-/*!
- \internal
- Returns a string with the path to qml resources, including qml sources,
- 3D assets and textures. The path depends on the platform, and (for
- some platforms) whether it was installed from a package or is being run
- in a development setting.
-*/
-static QString q_get_qmldir(const QString &name)
-{
- QString qml = name;
- // try for a Linux package install first
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifdef QT3D_USE_OPT
- QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
-#endif
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
-#endif
- QString app = QCoreApplication::applicationFilePath();
- app = app.section(QDir::separator(), -1);
- if (pkgdir.cd(app) && pkgdir.exists())
- {
- qml = pkgdir.filePath(qml);
- }
- else
- {
- // failing that try Mac (pkg & dev) next
- QDir dir(QCoreApplication::applicationDirPath());
- if (dir.path().endsWith(QLatin1String("MacOS")))
- {
- if (dir.cdUp() && dir.cd(QLatin1String("Resources"))
- && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- qWarning("Expected app bundle with QML resources!");
- }
- }
- else
- {
- // for Windows (pkg & dev), and for Linux dev expect to find it
- // in a "resources" directory next to the binary
- if (dir.cd(QLatin1String("resources")) && dir.exists())
- {
- app = QDir::toNativeSeparators(app);
- //For windows platforms the "app" filepath should have the .exe extension removed.
- const QString winExtension = ".exe";
- if (app.right(winExtension.length()) == winExtension) {
- app = app.left(app.length() - winExtension.length());
- }
-
- //Grab just the app name itself.
- app = app.section(QDir::separator(), -1);
-
- if (dir.cd(QLatin1String("examples")) && dir.cd(app) && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- QString msg = QLatin1String("examples");
- msg += QDir::separator();
- msg += app;
- qWarning("Expected %s directry with qml resources!", qPrintable(msg));
- }
- }
- }
- }
- return qml;
-}
-
-#define QUICK3D_EXAMPLE_MAIN(file) \
-int main(int argc, char *argv[]) \
-{ \
- QGuiApplication app(argc, argv); \
- QSurfaceFormat f; \
- f.setSamples(16); \
- QQuickView view; \
- view.setFormat(f); \
- QString qml = q_get_qmldir(QLatin1String( file )); \
- view.setSource(QUrl::fromLocalFile(qml)); \
- if (QGuiApplication::arguments().contains(QLatin1String("-maximize"))) \
- view.showMaximized(); \
- else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen"))) \
- view.showFullScreen(); \
- else \
- view.show(); \
- return app.exec(); \
-} \
-
-
-#endif // QMLRES_H
diff --git a/tutorials/quick3d/qmlres.h b/tutorials/quick3d/qmlres.h
deleted file mode 100644
index 6663cfd21..000000000
--- a/tutorials/quick3d/qmlres.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef QMLRES_H
-#define QMLRES_H
-
-#include <QtCore/qdir.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QtCore/qdebug.h>
-
-#define internal_xstr(s) internal_str(s)
-#define internal_str(s) #s
-
-/*!
- \internal
- Returns a string with the path to qml resources, including qml sources,
- 3D assets and textures. The path depends on the platform, and (for
- some platforms) whether it was installed from a package or is being run
- in a development setting.
-*/
-static QString q_get_qmldir(const QString &name)
-{
- QString qml = name;
- // try for a Linux package install first
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifdef QT3D_USE_OPT
- QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
-#endif
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
-#endif
- QString app = QCoreApplication::applicationFilePath();
- app = app.section(QDir::separator(), -1);
- if (pkgdir.cd(app) && pkgdir.exists())
- {
- qml = pkgdir.filePath(qml);
- }
- else
- {
- // failing that try Mac (pkg & dev) next
- QDir dir(QCoreApplication::applicationDirPath());
- if (dir.path().endsWith(QLatin1String("MacOS")))
- {
- if (dir.cdUp() && dir.cd(QLatin1String("Resources"))
- && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- qWarning("Expected app bundle with QML resources!");
- }
- }
- else
- {
- // for Windows (pkg & dev), and for Linux dev expect to find it
- // in a "resources" directory next to the binary
- if (dir.cd(QLatin1String("resources")) && dir.exists())
- {
- QString app = QCoreApplication::applicationFilePath();
- app = QDir::toNativeSeparators(app);
- //For windows platforms the "app" filepath should have the .exe extension removed.
- const QString winExtension = ".exe";
- if (app.right(winExtension.length()) == winExtension) {
- app = app.left(app.length() - winExtension.length());
- }
-
- //Grab just the app name itself.
- app = app.section(QDir::separator(), -1);
-
- if (dir.cd(QLatin1String("examples")) && dir.cd(app) && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- QString msg = QLatin1String("examples");
- msg += QDir::separator();
- msg += app;
- qWarning("Expected %s directry with qml resources!", qPrintable(msg));
- }
- }
- }
- }
- return qml;
-}
-
-#endif // QMLRES_H
diff --git a/tutorials/quick3d/shadertut/main.cpp b/tutorials/quick3d/shadertut/main.cpp
index cfef8c94f..402f88fc2 100644
--- a/tutorials/quick3d/shadertut/main.cpp
+++ b/tutorials/quick3d/shadertut/main.cpp
@@ -38,6 +38,9 @@
**
****************************************************************************/
-#include "../qmlres.h"
+#include <qmlres.h>
-QUICK3D_EXAMPLE_MAIN("qml/shader-tutorial.qml")
+int main(int argc, char *argv[])
+{
+ return q_quick3d_main("qml/desktop.qml", "tutorials", argc, argv);
+}
diff --git a/tutorials/quick3d/shadertut/mt.qml b/tutorials/quick3d/shadertut/mt.qml
new file mode 100644
index 000000000..daf2fbc05
--- /dev/null
+++ b/tutorials/quick3d/shadertut/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ ShaderTutorial {
+ }
+}
diff --git a/tutorials/quick3d/shadertut/qml/shader-tutorial.qml b/tutorials/quick3d/shadertut/qml/ShaderTutorial.qml
index b5e83227f..4c26df8e2 100644
--- a/tutorials/quick3d/shadertut/qml/shader-tutorial.qml
+++ b/tutorials/quick3d/shadertut/qml/ShaderTutorial.qml
@@ -42,8 +42,7 @@ import QtQuick 2.0
import Qt3D 1.0
Viewport {
- width: 640; height: 480
-
+ width: parent.width; height: parent.height
TutorialTeapot {
id: teapot
@@ -53,7 +52,7 @@ Viewport {
ShaderProgram {
id: program
- texture: "textures/qtlogo.png"
+ texture: "qtlogo.png"
vertexShader: "
attribute highp vec4 qt_Vertex;
diff --git a/tutorials/quick3d/shadertut/qml/desktop.qml b/tutorials/quick3d/shadertut/qml/desktop.qml
new file mode 100644
index 000000000..e92efbc69
--- /dev/null
+++ b/tutorials/quick3d/shadertut/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ ShaderTutorial {
+ }
+}
diff --git a/tutorials/quick3d/shadertut/qml/qtlogo.png b/tutorials/quick3d/shadertut/qml/qtlogo.png
new file mode 100644
index 000000000..7d3e97eb3
--- /dev/null
+++ b/tutorials/quick3d/shadertut/qml/qtlogo.png
Binary files differ
diff --git a/tutorials/quick3d/shadertut/qtquick3d.ico b/tutorials/quick3d/shadertut/qtquick3d.ico
new file mode 100644
index 000000000..b3b85e37b
--- /dev/null
+++ b/tutorials/quick3d/shadertut/qtquick3d.ico
Binary files differ
diff --git a/tutorials/quick3d/shadertut/shadertut.pro b/tutorials/quick3d/shadertut/shadertut.pro
index a3ee6e1c4..0d37af691 100644
--- a/tutorials/quick3d/shadertut/shadertut.pro
+++ b/tutorials/quick3d/shadertut/shadertut.pro
@@ -8,34 +8,27 @@ SOURCES += main.cpp
ICON_FILE = ../icon.png
QML_FILES = \
+ qml/desktop.qml \
qml/TutorialTeapot.qml \
qml/shader-tutorial-1-textures.qml \
qml/shader-tutorial-3-transformed-coordinates.qml \
qml/shader-tutorial-varying.qml \
qml/shader-tutorial-2-vertex-shader.qml \
qml/shader-tutorial-lighting.qml \
- qml/shader-tutorial.qml
+ qml/ShaderTutorial.qml
QML_INFRA_FILES = \
- $$QML_FILES \
- qml/basket.jpg
+ $$QML_FILES
QML_MESHES_FILES = \
qml/meshes/teapot.bez
-CATEGORY = examples
+CATEGORY = tutorials
include(../../../pkg.pri)
-INSTALL_DIRS = qml
-mt: INSTALL_FILES = mt.qml
-
OTHER_FILES += \
mt.qml \
- basket_qml.rc \
+ shadertut.rc \
$$QML_INFRA_FILES
-RC_FILE = basket_qml.rc
-
-RESOURCES += \
- basket.qrc
-
+RC_FILE = shadertut.rc
diff --git a/tutorials/quick3d/shadertut/shadertut.rc b/tutorials/quick3d/shadertut/shadertut.rc
new file mode 100644
index 000000000..1b6228c97
--- /dev/null
+++ b/tutorials/quick3d/shadertut/shadertut.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "qtquick3d.ico"
diff --git a/tutorials/quick3d/teapot_bounce_qml/main.cpp b/tutorials/quick3d/teapot_bounce_qml/main.cpp
index 70835bc89..9a878d71c 100644
--- a/tutorials/quick3d/teapot_bounce_qml/main.cpp
+++ b/tutorials/quick3d/teapot_bounce_qml/main.cpp
@@ -39,30 +39,9 @@
**
****************************************************************************/
-#include <QGuiApplication>
-#include <QQuickView>
-
-#include "../qmlres.h"
+#include <qmlres.h>
int main(int argc, char *argv[])
{
- QGuiApplication app(argc, argv);
-
- QSurfaceFormat f;
- f.setSamples(16);
-
- QQuickView view;
- view.setFormat(f);
-
- QString qml = q_get_qmldir(QLatin1String("qml/bounce-teapot.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QGuiApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
+ return q_quick3d_main("qml/desktop.qml", "tutorials", argc, argv);
}
diff --git a/tutorials/quick3d/teapot_bounce_qml/mt.qml b/tutorials/quick3d/teapot_bounce_qml/mt.qml
new file mode 100644
index 000000000..e598bc154
--- /dev/null
+++ b/tutorials/quick3d/teapot_bounce_qml/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ TeapotBounce {
+ }
+}
diff --git a/tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml b/tutorials/quick3d/teapot_bounce_qml/qml/TeapotBounce.qml
index 16cbd08a9..5f7a1fa82 100644
--- a/tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml
+++ b/tutorials/quick3d/teapot_bounce_qml/qml/TeapotBounce.qml
@@ -42,7 +42,7 @@ import QtQuick 2.0
import Qt3D 1.0
Viewport {
- width: 640; height: 480
+ width: parent.width; height: parent.height
//! [1]
Item3D {
diff --git a/tutorials/quick3d/teapot_bounce_qml/qml/desktop.qml b/tutorials/quick3d/teapot_bounce_qml/qml/desktop.qml
new file mode 100644
index 000000000..5a478059c
--- /dev/null
+++ b/tutorials/quick3d/teapot_bounce_qml/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ TeapotBounce {
+ }
+}
diff --git a/tutorials/quick3d/teapot_bounce_qml/qml/teapot.bez b/tutorials/quick3d/teapot_bounce_qml/qml/meshes/teapot.bez
index 02b2ac447..02b2ac447 100644
--- a/tutorials/quick3d/teapot_bounce_qml/qml/teapot.bez
+++ b/tutorials/quick3d/teapot_bounce_qml/qml/meshes/teapot.bez
diff --git a/tutorials/quick3d/teapot_bounce_qml/qtquick3d.ico b/tutorials/quick3d/teapot_bounce_qml/qtquick3d.ico
new file mode 100644
index 000000000..b3b85e37b
--- /dev/null
+++ b/tutorials/quick3d/teapot_bounce_qml/qtquick3d.ico
Binary files differ
diff --git a/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro b/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
index 81ac9af98..8f36d94b6 100644
--- a/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
+++ b/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
@@ -2,8 +2,28 @@ TEMPLATE = app
TARGET = teapot_bounce_qml
CONFIG += qt warn_on
-QT += 3d quick
+QT += declarative quick 3dquick
SOURCES += main.cpp
-HEADERS += ../qmlres.h
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/TeapotBounce.qml \
+ qml/desktop.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/teapot.bez
+
+CATEGORY = tutorials
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ teapot_bounce_qml.rc \
+ $$QML_INFRA_FILES
+
+RC_FILE = teapot_bounce_qml.rc
diff --git a/tutorials/quick3d/teapot_qml/main.cpp b/tutorials/quick3d/teapot_qml/main.cpp
index b3cc4a590..9a878d71c 100644
--- a/tutorials/quick3d/teapot_qml/main.cpp
+++ b/tutorials/quick3d/teapot_qml/main.cpp
@@ -39,30 +39,9 @@
**
****************************************************************************/
-#include <QGuiApplication>
-#include <QQuickView>
-
-#include "../qmlres.h"
+#include <qmlres.h>
int main(int argc, char *argv[])
{
- QGuiApplication app(argc, argv);
-
- QSurfaceFormat f;
- f.setSamples(16);
-
- QQuickView view;
- view.setFormat(f);
-
- QString qml = q_get_qmldir(QLatin1String("qml/teapot.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QGuiApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QGuiApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
+ return q_quick3d_main("qml/desktop.qml", "tutorials", argc, argv);
}
diff --git a/tutorials/quick3d/teapot_qml/mt.qml b/tutorials/quick3d/teapot_qml/mt.qml
new file mode 100644
index 000000000..5a9396400
--- /dev/null
+++ b/tutorials/quick3d/teapot_qml/mt.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "qml"
+
+Item {
+ width: 320
+ height: 480
+
+ Teapot {
+ }
+}
diff --git a/tutorials/quick3d/teapot_qml/qml/teapot.qml b/tutorials/quick3d/teapot_qml/qml/Teapot.qml
index 8e68e5219..8e68e5219 100644
--- a/tutorials/quick3d/teapot_qml/qml/teapot.qml
+++ b/tutorials/quick3d/teapot_qml/qml/Teapot.qml
diff --git a/tutorials/quick3d/teapot_qml/qml/desktop.qml b/tutorials/quick3d/teapot_qml/qml/desktop.qml
new file mode 100644
index 000000000..bcc6970b8
--- /dev/null
+++ b/tutorials/quick3d/teapot_qml/qml/desktop.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import Qt3D 1.0
+import Qt3D.Shapes 1.0
+import "."
+
+Item {
+ width: 640
+ height: 480
+
+ Teapot {
+ }
+}
diff --git a/tutorials/quick3d/teapot_qml/qml/teapot.bez b/tutorials/quick3d/teapot_qml/qml/meshes/teapot.bez
index 02b2ac447..02b2ac447 100644
--- a/tutorials/quick3d/teapot_qml/qml/teapot.bez
+++ b/tutorials/quick3d/teapot_qml/qml/meshes/teapot.bez
diff --git a/tutorials/quick3d/teapot_qml/qtquick3d.ico b/tutorials/quick3d/teapot_qml/qtquick3d.ico
new file mode 100644
index 000000000..b3b85e37b
--- /dev/null
+++ b/tutorials/quick3d/teapot_qml/qtquick3d.ico
Binary files differ
diff --git a/tutorials/quick3d/teapot_qml/teapot_qml.pro b/tutorials/quick3d/teapot_qml/teapot_qml.pro
index 018dd6d7f..a316488fb 100644
--- a/tutorials/quick3d/teapot_qml/teapot_qml.pro
+++ b/tutorials/quick3d/teapot_qml/teapot_qml.pro
@@ -2,7 +2,28 @@ TEMPLATE = app
TARGET = teapot_qml
CONFIG += qt warn_on
-QT += 3d quick
+QT += 3dquick quick
SOURCES += main.cpp
-HEADERS += ../qmlres.h
+
+ICON_FILE = ../icon.png
+
+QML_FILES = \
+ qml/desktop.qml \
+ qml/Teapot.qml
+
+QML_INFRA_FILES = \
+ $$QML_FILES
+
+QML_MESHES_FILES = \
+ qml/meshes/teapot.bez
+
+CATEGORY = tutorials
+include(../../../pkg.pri)
+
+OTHER_FILES += \
+ mt.qml \
+ teapot_qml.rc \
+ $$QML_INFRA_FILES
+
+RC_FILE = teapot_qml.rc