summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-11-17 15:49:54 +0100
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-11-17 15:58:49 +0100
commit0cf48a31c5d67229d18ddab872c9a58daa021943 (patch)
tree44ebad4d86cde88dc49766ba0f075abdcd3bcf83 /examples
parentf65bf7667c8ac651f54c81e78a3122acd649ffdd (diff)
downloadqt4-tools-0cf48a31c5d67229d18ddab872c9a58daa021943.tar.gz
Modelviews Examples Modifications
modelviews/webview/ alerts, autosize, googlemaps, inlinehtml and newwindows example modifications Modified examples to use centralized qmlapplicationviewer, removed duplicate files and modified project files according to the changes. Merge-request: 2719 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/modelviews/webview/alerts.qml101
-rw-r--r--examples/declarative/modelviews/webview/alerts/alerts.pro4
-rw-r--r--examples/declarative/modelviews/webview/alerts/alerts.qmlproject (renamed from examples/declarative/modelviews/webview/alerts/qml/webview.qmlproject)6
-rw-r--r--examples/declarative/modelviews/webview/alerts/main.cpp2
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.html (renamed from examples/declarative/modelviews/webview/alerts/qml/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/alerts.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/autosize.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/Map.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/content/Mapping/Map.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/map.html (renamed from examples/declarative/modelviews/webview/alerts/qml/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/cancel.png (renamed from examples/declarative/modelviews/webview/alerts/qml/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/ok.png (renamed from examples/declarative/modelviews/webview/alerts/qml/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/googlemaps.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/googlemaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/inlinehtml.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/inlinehtml.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.html (renamed from examples/declarative/modelviews/webview/alerts/qml/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.qml (renamed from examples/declarative/modelviews/webview/alerts/qml/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.cpp197
-rw-r--r--examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.pri154
-rw-r--r--examples/declarative/modelviews/webview/autosize.qml106
-rw-r--r--examples/declarative/modelviews/webview/autosize/autosize.pro4
-rw-r--r--examples/declarative/modelviews/webview/autosize/autosize.qmlproject (renamed from examples/declarative/modelviews/webview/autosize/qml/webview.qmlproject)6
-rw-r--r--examples/declarative/modelviews/webview/autosize/main.cpp2
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.html (renamed from examples/declarative/modelviews/webview/autosize/qml/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/alerts.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/autosize.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/Map.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/content/Mapping/Map.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/map.html (renamed from examples/declarative/modelviews/webview/autosize/qml/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/cancel.png (renamed from examples/declarative/modelviews/webview/autosize/qml/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/ok.png (renamed from examples/declarative/modelviews/webview/autosize/qml/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/googlemaps.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/googlemaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/inlinehtml.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/inlinehtml.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.html (renamed from examples/declarative/modelviews/webview/autosize/qml/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.qml (renamed from examples/declarative/modelviews/webview/autosize/qml/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.cpp197
-rw-r--r--examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.pri154
-rw-r--r--examples/declarative/modelviews/webview/googlemaps.qml83
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/googlemaps.pro4
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/googlemaps.qmlproject (renamed from examples/declarative/modelviews/webview/googlemaps/qml/webview.qmlproject)6
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/main.cpp2
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.html (renamed from examples/declarative/modelviews/webview/googlemaps/qml/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/alerts.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/autosize.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/Map.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/Map.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/map.html (renamed from examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/cancel.png (renamed from examples/declarative/modelviews/webview/googlemaps/qml/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/ok.png (renamed from examples/declarative/modelviews/webview/googlemaps/qml/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/googlemaps.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/googlemaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/inlinehtml.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/inlinehtml.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.html (renamed from examples/declarative/modelviews/webview/googlemaps/qml/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.qml (renamed from examples/declarative/modelviews/webview/googlemaps/qml/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.cpp197
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.pri154
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml.qml55
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro4
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/inlinehtml.qmlproject (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/webview.qmlproject)6
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/main.cpp2
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.html (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/alerts.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/autosize.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/Map.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/Map.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/map.html (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/cancel.png (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/ok.png (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/googlemaps.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/googlemaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/inlinehtml.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.html (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.qml (renamed from examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.cpp197
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.pri154
-rw-r--r--examples/declarative/modelviews/webview/newwindows.qml71
-rw-r--r--examples/declarative/modelviews/webview/newwindows/main.cpp2
-rw-r--r--examples/declarative/modelviews/webview/newwindows/newwindows.pro4
-rw-r--r--examples/declarative/modelviews/webview/newwindows/newwindows.qmlproject16
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.html (renamed from examples/declarative/modelviews/webview/newwindows/qml/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/alerts.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/autosize.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/Map.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/Map.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/map.html (renamed from examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/cancel.png (renamed from examples/declarative/modelviews/webview/newwindows/qml/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/ok.png (renamed from examples/declarative/modelviews/webview/newwindows/qml/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/googlemaps.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/googlemaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/inlinehtml.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/inlinehtml.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.html (renamed from examples/declarative/modelviews/webview/newwindows/qml/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.qml (renamed from examples/declarative/modelviews/webview/newwindows/qml/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qml/webview.qmlproject16
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.cpp197
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.pri154
-rw-r--r--examples/declarative/modelviews/webview/webview.qmlproject16
92 files changed, 43 insertions, 2625 deletions
diff --git a/examples/declarative/modelviews/webview/alerts.qml b/examples/declarative/modelviews/webview/alerts.qml
deleted file mode 100644
index 5acf0e0980..0000000000
--- a/examples/declarative/modelviews/webview/alerts.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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 1.0
-import QtWebKit 1.0
-
-WebView {
- id: webView
- width: 200
- height: 150
- url: "alerts.html"
-
- onAlert: popup.show(message)
-
- Rectangle {
- id: popup
-
- color: "red"
- border.color: "black"; border.width: 2
- radius: 4
-
- y: parent.height // off "screen"
- anchors.horizontalCenter: parent.horizontalCenter
- width: label.width + 5
- height: label.height + 5
-
- opacity: 0
-
- function show(text) {
- label.text = text
- popup.state = "visible"
- timer.start()
- }
- states: State {
- name: "visible"
- PropertyChanges { target: popup; opacity: 1 }
- PropertyChanges { target: popup; y: (webView.height-popup.height)/2 }
- }
-
- transitions: [
- Transition { from: ""; PropertyAnimation { properties: "opacity,y"; duration: 65 } },
- Transition { from: "visible"; PropertyAnimation { properties: "opacity,y"; duration: 500 } }
- ]
-
- Timer {
- id: timer
- interval: 1000
-
- onTriggered: popup.state = ""
- }
-
- Text {
- id: label
- anchors.centerIn: parent
- width: webView.width *0.75
-
- color: "white"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- horizontalAlignment: Text.AlignHCenter
- smooth: true
- }
- }
-}
diff --git a/examples/declarative/modelviews/webview/alerts/alerts.pro b/examples/declarative/modelviews/webview/alerts/alerts.pro
index 335c3a3f2b..1de38585a0 100644
--- a/examples/declarative/modelviews/webview/alerts/alerts.pro
+++ b/examples/declarative/modelviews/webview/alerts/alerts.pro
@@ -1,5 +1,5 @@
# Add more folders to ship with the application, here
-folder_01.source = qml
+folder_01.source = qml/alerts
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
@@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xE14997C0
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
diff --git a/examples/declarative/modelviews/webview/alerts/qml/webview.qmlproject b/examples/declarative/modelviews/webview/alerts/alerts.qmlproject
index d4909f8685..f1868405fc 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/webview.qmlproject
+++ b/examples/declarative/modelviews/webview/alerts/alerts.qmlproject
@@ -3,13 +3,13 @@ import QmlProject 1.0
Project {
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
- directory: "."
+ directory: "qml/alerts"
}
JavaScriptFiles {
- directory: "."
+ directory: "qml/alerts"
}
ImageFiles {
- directory: "."
+ directory: "qml/alerts"
}
/* List of plugin directories passed to QML runtime */
// importPaths: [ " ../exampleplugin " ]
diff --git a/examples/declarative/modelviews/webview/alerts/main.cpp b/examples/declarative/modelviews/webview/alerts/main.cpp
index e57f541d71..8fbc0e590b 100644
--- a/examples/declarative/modelviews/webview/alerts/main.cpp
+++ b/examples/declarative/modelviews/webview/alerts/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/qml/alerts.qml"));
+ viewer.setMainQmlFile(QLatin1String("qml/alerts/alerts.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/declarative/modelviews/webview/alerts/qml/alerts.html b/examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.html
index 82caddf7fb..82caddf7fb 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/alerts.html
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.html
diff --git a/examples/declarative/modelviews/webview/alerts/qml/alerts.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.qml
index 4aa4a3bc75..4aa4a3bc75 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/alerts.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/alerts.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qml/autosize.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/autosize.qml
index 7e10403f8f..7e10403f8f 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/autosize.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/autosize.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qml/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/Map.qml
index 9a865795e0..9a865795e0 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/Map.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qml/content/Mapping/map.html b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/map.html
index a98da5430f..a98da5430f 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/Mapping/map.html
diff --git a/examples/declarative/modelviews/webview/alerts/qml/content/pics/cancel.png b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/cancel.png
index ecc95331f2..ecc95331f2 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/alerts/qml/content/pics/ok.png b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/ok.png
index 5795f04fbf..5795f04fbf 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/alerts/qml/googlemaps.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/googlemaps.qml
index aed0ddd025..aed0ddd025 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/googlemaps.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/googlemaps.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qml/inlinehtml.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/inlinehtml.qml
index afc1fa93d3..afc1fa93d3 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/inlinehtml.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/inlinehtml.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qml/newwindows.html b/examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.html
index f169599387..f169599387 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/newwindows.html
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.html
diff --git a/examples/declarative/modelviews/webview/alerts/qml/newwindows.qml b/examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.qml
index 52f7a0b4dd..52f7a0b4dd 100644
--- a/examples/declarative/modelviews/webview/alerts/qml/newwindows.qml
+++ b/examples/declarative/modelviews/webview/alerts/qml/alerts/newwindows.qml
diff --git a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 411a04c139..0000000000
--- a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x28c7 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qmlapplicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
-#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
-
-#if defined(QMLJSDEBUGGER)
-
-// Enable debugging before any QDeclarativeEngine is created
-struct QmlJsDebuggingEnabler
-{
- QmlJsDebuggingEnabler()
- {
- QDeclarativeDebugHelper::enableDebugging();
- }
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-static QmlJsDebuggingEnabler enableDebuggingHelper;
-
-#endif // QMLJSDEBUGGER
-
-class QmlApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInShareDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../share/")
- + QFileInfo(QCoreApplication::applicationFilePath()).fileName()
- + QLatin1Char('/') + path;
- if (QFileInfo(pathInShareDir).exists())
- return pathInShareDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
-}
-
-void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
-{
-#ifdef Q_OS_SYMBIAN
- if (orientation != ScreenOrientationAuto) {
-#if defined(ORIENTATIONLOCK)
- const CAknAppUiBase::TAppUiOrientation uiOrientation =
- (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
- : CAknAppUi::EAppUiOrientationLandscape;
- CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
- TRAPD(error,
- if (appUi)
- appUi->SetOrientationL(uiOrientation);
- );
- Q_UNUSED(error)
-#else // ORIENTATIONLOCK
- qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
-#endif // ORIENTATIONLOCK
- }
-#elif defined(Q_WS_MAEMO_5)
- Qt::WidgetAttribute attribute;
- switch (orientation) {
- case ScreenOrientationLockPortrait:
- attribute = Qt::WA_Maemo5PortraitOrientation;
- break;
- case ScreenOrientationLockLandscape:
- attribute = Qt::WA_Maemo5LandscapeOrientation;
- break;
- case ScreenOrientationAuto:
- default:
- attribute = Qt::WA_Maemo5AutoOrientation;
- break;
- }
- setAttribute(attribute, true);
-#else // Q_OS_SYMBIAN
- Q_UNUSED(orientation);
-#endif // Q_OS_SYMBIAN
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index f5b24b0199..0000000000
--- a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x5a59 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
- void setOrientation(ScreenOrientation orientation);
- void showExpanded();
-
-private:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index 1c0c7edb39..0000000000
--- a/examples/declarative/modelviews/webview/alerts/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,154 +0,0 @@
-# checksum 0x3dc8 version 0x2000a
-# This file was generated by the Qt Quick Application wizard of Qt Creator.
-# The code below adds the QmlApplicationViewer to the project and handles the
-# activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += declarative
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-defineTest(minQtVersion) {
- maj = $$1
- min = $$2
- patch = $$3
- isEqual(QT_MAJOR_VERSION, $$maj) {
- isEqual(QT_MINOR_VERSION, $$min) {
- isEqual(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- greaterThan(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- }
- greaterThan(QT_MINOR_VERSION, $$min) {
- return(true)
- }
- }
- return(false)
-}
-
-contains(DEFINES, QMLJSDEBUGGER) {
- CONFIG(debug, debug|release) {
- !minQtVersion(4, 7, 1) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("This library requires Qt 4.7.1 or newer.")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else:isEmpty(QMLJSDEBUGGER_PATH) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("Please specify its location on the qmake command line, eg")
- warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
- }
- } else {
- DEFINES -= QMLJSDEBUGGER
- }
-}
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemsources = $${item}.sources
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-symbian {
- ICON = $${TARGET}.svg
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
- contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
-} else:win32 {
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$eval($${deploymentfolder}.source)
- pathSegments = $$split(source, /)
- sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
- copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- installPrefix = /opt/usr
- desktopfile.path = /usr/share/applications/hildon
- } else {
- installPrefix = /usr/local
- desktopfile.path = /usr/share/applications
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- copyCommand += && $(MKDIR) $$target
- copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
- icon.files = $${TARGET}.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- desktopfile.files = $${TARGET}.desktop
- target.path = $${installPrefix}/bin
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- export(target.path)
- INSTALLS += desktopfile icon target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/declarative/modelviews/webview/autosize.qml b/examples/declarative/modelviews/webview/autosize.qml
deleted file mode 100644
index d7d6764659..0000000000
--- a/examples/declarative/modelviews/webview/autosize.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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 1.0
-import QtWebKit 1.0
-
-// The WebView size is determined by the width, height,
-// preferredWidth, and preferredHeight properties.
-Rectangle {
- id: rect
- width: 200
- height: layout.height
-
- Column {
- id: layout
- spacing: 2
-
- WebView {
- html: "No width defined."
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
-
- WebView {
- width: rect.width
- html: "The width is full."
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
-
- WebView {
- width: rect.width/2
- html: "The width is half."
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
- WebView {
- width: rect.width/2
- html: "The_width_is_half." // not wrapped
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
-
- WebView {
- preferredWidth: rect.width/2
- html: "The preferredWidth is half."
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
- WebView {
- preferredWidth: rect.width/2
- html: "The_preferredWidth_is_half." // not wrapped
- Rectangle {
- color: "#10000000"
- anchors.fill: parent
- }
- }
- }
-}
diff --git a/examples/declarative/modelviews/webview/autosize/autosize.pro b/examples/declarative/modelviews/webview/autosize/autosize.pro
index a17f822bba..13913c618a 100644
--- a/examples/declarative/modelviews/webview/autosize/autosize.pro
+++ b/examples/declarative/modelviews/webview/autosize/autosize.pro
@@ -1,5 +1,5 @@
# Add more folders to ship with the application, here
-folder_01.source = qml
+folder_01.source = qml/autosize
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
@@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEE6AB317
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
diff --git a/examples/declarative/modelviews/webview/autosize/qml/webview.qmlproject b/examples/declarative/modelviews/webview/autosize/autosize.qmlproject
index d4909f8685..f1bf807c92 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/webview.qmlproject
+++ b/examples/declarative/modelviews/webview/autosize/autosize.qmlproject
@@ -3,13 +3,13 @@ import QmlProject 1.0
Project {
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
- directory: "."
+ directory: "qml/autosize"
}
JavaScriptFiles {
- directory: "."
+ directory: "qml/autosize"
}
ImageFiles {
- directory: "."
+ directory: "qml/autosize"
}
/* List of plugin directories passed to QML runtime */
// importPaths: [ " ../exampleplugin " ]
diff --git a/examples/declarative/modelviews/webview/autosize/main.cpp b/examples/declarative/modelviews/webview/autosize/main.cpp
index 9a7f6ec170..86fdd6c2e3 100644
--- a/examples/declarative/modelviews/webview/autosize/main.cpp
+++ b/examples/declarative/modelviews/webview/autosize/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
- viewer.setMainQmlFile(QLatin1String("qml/qml/autosize.qml"));
+ viewer.setMainQmlFile(QLatin1String("qml/autosize/autosize.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/declarative/modelviews/webview/autosize/qml/alerts.html b/examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.html
index 82caddf7fb..82caddf7fb 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/alerts.html
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.html
diff --git a/examples/declarative/modelviews/webview/autosize/qml/alerts.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.qml
index 4aa4a3bc75..4aa4a3bc75 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/alerts.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/alerts.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qml/autosize.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/autosize.qml
index 7e10403f8f..7e10403f8f 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/autosize.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/autosize.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qml/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/Map.qml
index 9a865795e0..9a865795e0 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/Map.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qml/content/Mapping/map.html b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/map.html
index a98da5430f..a98da5430f 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/Mapping/map.html
diff --git a/examples/declarative/modelviews/webview/autosize/qml/content/pics/cancel.png b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/cancel.png
index ecc95331f2..ecc95331f2 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/autosize/qml/content/pics/ok.png b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/ok.png
index 5795f04fbf..5795f04fbf 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/autosize/qml/googlemaps.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/googlemaps.qml
index aed0ddd025..aed0ddd025 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/googlemaps.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/googlemaps.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qml/inlinehtml.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/inlinehtml.qml
index afc1fa93d3..afc1fa93d3 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/inlinehtml.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/inlinehtml.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qml/newwindows.html b/examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.html
index f169599387..f169599387 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/newwindows.html
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.html
diff --git a/examples/declarative/modelviews/webview/autosize/qml/newwindows.qml b/examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.qml
index 52f7a0b4dd..52f7a0b4dd 100644
--- a/examples/declarative/modelviews/webview/autosize/qml/newwindows.qml
+++ b/examples/declarative/modelviews/webview/autosize/qml/autosize/newwindows.qml
diff --git a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 411a04c139..0000000000
--- a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x28c7 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qmlapplicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
-#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
-
-#if defined(QMLJSDEBUGGER)
-
-// Enable debugging before any QDeclarativeEngine is created
-struct QmlJsDebuggingEnabler
-{
- QmlJsDebuggingEnabler()
- {
- QDeclarativeDebugHelper::enableDebugging();
- }
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-static QmlJsDebuggingEnabler enableDebuggingHelper;
-
-#endif // QMLJSDEBUGGER
-
-class QmlApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInShareDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../share/")
- + QFileInfo(QCoreApplication::applicationFilePath()).fileName()
- + QLatin1Char('/') + path;
- if (QFileInfo(pathInShareDir).exists())
- return pathInShareDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
-}
-
-void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
-{
-#ifdef Q_OS_SYMBIAN
- if (orientation != ScreenOrientationAuto) {
-#if defined(ORIENTATIONLOCK)
- const CAknAppUiBase::TAppUiOrientation uiOrientation =
- (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
- : CAknAppUi::EAppUiOrientationLandscape;
- CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
- TRAPD(error,
- if (appUi)
- appUi->SetOrientationL(uiOrientation);
- );
- Q_UNUSED(error)
-#else // ORIENTATIONLOCK
- qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
-#endif // ORIENTATIONLOCK
- }
-#elif defined(Q_WS_MAEMO_5)
- Qt::WidgetAttribute attribute;
- switch (orientation) {
- case ScreenOrientationLockPortrait:
- attribute = Qt::WA_Maemo5PortraitOrientation;
- break;
- case ScreenOrientationLockLandscape:
- attribute = Qt::WA_Maemo5LandscapeOrientation;
- break;
- case ScreenOrientationAuto:
- default:
- attribute = Qt::WA_Maemo5AutoOrientation;
- break;
- }
- setAttribute(attribute, true);
-#else // Q_OS_SYMBIAN
- Q_UNUSED(orientation);
-#endif // Q_OS_SYMBIAN
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index f5b24b0199..0000000000
--- a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x5a59 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
- void setOrientation(ScreenOrientation orientation);
- void showExpanded();
-
-private:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index 1c0c7edb39..0000000000
--- a/examples/declarative/modelviews/webview/autosize/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,154 +0,0 @@
-# checksum 0x3dc8 version 0x2000a
-# This file was generated by the Qt Quick Application wizard of Qt Creator.
-# The code below adds the QmlApplicationViewer to the project and handles the
-# activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += declarative
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-defineTest(minQtVersion) {
- maj = $$1
- min = $$2
- patch = $$3
- isEqual(QT_MAJOR_VERSION, $$maj) {
- isEqual(QT_MINOR_VERSION, $$min) {
- isEqual(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- greaterThan(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- }
- greaterThan(QT_MINOR_VERSION, $$min) {
- return(true)
- }
- }
- return(false)
-}
-
-contains(DEFINES, QMLJSDEBUGGER) {
- CONFIG(debug, debug|release) {
- !minQtVersion(4, 7, 1) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("This library requires Qt 4.7.1 or newer.")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else:isEmpty(QMLJSDEBUGGER_PATH) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("Please specify its location on the qmake command line, eg")
- warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
- }
- } else {
- DEFINES -= QMLJSDEBUGGER
- }
-}
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemsources = $${item}.sources
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-symbian {
- ICON = $${TARGET}.svg
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
- contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
-} else:win32 {
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$eval($${deploymentfolder}.source)
- pathSegments = $$split(source, /)
- sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
- copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- installPrefix = /opt/usr
- desktopfile.path = /usr/share/applications/hildon
- } else {
- installPrefix = /usr/local
- desktopfile.path = /usr/share/applications
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- copyCommand += && $(MKDIR) $$target
- copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
- icon.files = $${TARGET}.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- desktopfile.files = $${TARGET}.desktop
- target.path = $${installPrefix}/bin
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- export(target.path)
- INSTALLS += desktopfile icon target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/declarative/modelviews/webview/googlemaps.qml b/examples/declarative/modelviews/webview/googlemaps.qml
deleted file mode 100644
index 85641f4171..0000000000
--- a/examples/declarative/modelviews/webview/googlemaps.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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$
-**
-****************************************************************************/
-
-// This example demonstrates how Web services such as Google Maps can be
-// abstracted as QML types. Here we have a "Mapping" module with a "Map"
-// type. The Map type has an address property. Setting that property moves
-// the map. The underlying implementation uses WebView and the Google Maps
-// API, but users from QML don't need to understand the implementation in
-// order to create a Map.
-
-import QtQuick 1.0
-import QtWebKit 1.0
-import "content/Mapping"
-
-Map {
- id: map
- width: 300
- height: 300
- address: "Paris"
-
- Rectangle {
- x: 70
- width: input.width + 20
- height: input.height + 4
- anchors.bottom: parent.bottom; anchors.bottomMargin: 5
- radius: 5
- opacity: map.status == "Ready" ? 1 : 0
-
- TextInput {
- id: input
- text: map.address
- anchors.centerIn: parent
- Keys.onReturnPressed: map.address = input.text
- }
- }
-
- Text {
- id: loading
- anchors.centerIn: parent
- text: map.status == "Error" ? "Error" : "Loading"
- opacity: map.status == "Ready" ? 0 : 1
- font.pixelSize: 30
-
- Behavior on opacity { NumberAnimation{} }
- }
-}
diff --git a/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro b/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro
index 2a4c5f2e67..2bbfbf5250 100644
--- a/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro
+++ b/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro
@@ -1,5 +1,5 @@
# Add more folders to ship with the application, here
-folder_01.source = qml
+folder_01.source = qml/googlemaps
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
@@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEF02570C
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/webview.qmlproject b/examples/declarative/modelviews/webview/googlemaps/googlemaps.qmlproject
index d4909f8685..23a41e5d88 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/webview.qmlproject
+++ b/examples/declarative/modelviews/webview/googlemaps/googlemaps.qmlproject
@@ -3,13 +3,13 @@ import QmlProject 1.0
Project {
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
- directory: "."
+ directory: "qml/googlemaps"
}
JavaScriptFiles {
- directory: "."
+ directory: "qml/googlemaps"
}
ImageFiles {
- directory: "."
+ directory: "qml/googlemaps"
}
/* List of plugin directories passed to QML runtime */
// importPaths: [ " ../exampleplugin " ]
diff --git a/examples/declarative/modelviews/webview/googlemaps/main.cpp b/examples/declarative/modelviews/webview/googlemaps/main.cpp
index 9e4da077aa..0aaf0175e3 100644
--- a/examples/declarative/modelviews/webview/googlemaps/main.cpp
+++ b/examples/declarative/modelviews/webview/googlemaps/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/qml/googlemaps.qml"));
+ viewer.setMainQmlFile(QLatin1String("qml/googlemaps/googlemaps.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/alerts.html b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.html
index 82caddf7fb..82caddf7fb 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/alerts.html
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.html
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/alerts.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.qml
index 4aa4a3bc75..4aa4a3bc75 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/alerts.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/alerts.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/autosize.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/autosize.qml
index 7e10403f8f..7e10403f8f 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/autosize.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/autosize.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/Map.qml
index 9a865795e0..9a865795e0 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/Map.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/map.html b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/map.html
index a98da5430f..a98da5430f 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/Mapping/map.html
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/content/pics/cancel.png b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/cancel.png
index ecc95331f2..ecc95331f2 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/content/pics/ok.png b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/ok.png
index 5795f04fbf..5795f04fbf 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/googlemaps.qml
index aed0ddd025..aed0ddd025 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/googlemaps.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/inlinehtml.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/inlinehtml.qml
index afc1fa93d3..afc1fa93d3 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/inlinehtml.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/inlinehtml.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/newwindows.html b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.html
index f169599387..f169599387 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/newwindows.html
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.html
diff --git a/examples/declarative/modelviews/webview/googlemaps/qml/newwindows.qml b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.qml
index 52f7a0b4dd..52f7a0b4dd 100644
--- a/examples/declarative/modelviews/webview/googlemaps/qml/newwindows.qml
+++ b/examples/declarative/modelviews/webview/googlemaps/qml/googlemaps/newwindows.qml
diff --git a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 411a04c139..0000000000
--- a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x28c7 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qmlapplicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
-#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
-
-#if defined(QMLJSDEBUGGER)
-
-// Enable debugging before any QDeclarativeEngine is created
-struct QmlJsDebuggingEnabler
-{
- QmlJsDebuggingEnabler()
- {
- QDeclarativeDebugHelper::enableDebugging();
- }
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-static QmlJsDebuggingEnabler enableDebuggingHelper;
-
-#endif // QMLJSDEBUGGER
-
-class QmlApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInShareDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../share/")
- + QFileInfo(QCoreApplication::applicationFilePath()).fileName()
- + QLatin1Char('/') + path;
- if (QFileInfo(pathInShareDir).exists())
- return pathInShareDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
-}
-
-void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
-{
-#ifdef Q_OS_SYMBIAN
- if (orientation != ScreenOrientationAuto) {
-#if defined(ORIENTATIONLOCK)
- const CAknAppUiBase::TAppUiOrientation uiOrientation =
- (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
- : CAknAppUi::EAppUiOrientationLandscape;
- CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
- TRAPD(error,
- if (appUi)
- appUi->SetOrientationL(uiOrientation);
- );
- Q_UNUSED(error)
-#else // ORIENTATIONLOCK
- qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
-#endif // ORIENTATIONLOCK
- }
-#elif defined(Q_WS_MAEMO_5)
- Qt::WidgetAttribute attribute;
- switch (orientation) {
- case ScreenOrientationLockPortrait:
- attribute = Qt::WA_Maemo5PortraitOrientation;
- break;
- case ScreenOrientationLockLandscape:
- attribute = Qt::WA_Maemo5LandscapeOrientation;
- break;
- case ScreenOrientationAuto:
- default:
- attribute = Qt::WA_Maemo5AutoOrientation;
- break;
- }
- setAttribute(attribute, true);
-#else // Q_OS_SYMBIAN
- Q_UNUSED(orientation);
-#endif // Q_OS_SYMBIAN
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index f5b24b0199..0000000000
--- a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x5a59 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
- void setOrientation(ScreenOrientation orientation);
- void showExpanded();
-
-private:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index 1c0c7edb39..0000000000
--- a/examples/declarative/modelviews/webview/googlemaps/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,154 +0,0 @@
-# checksum 0x3dc8 version 0x2000a
-# This file was generated by the Qt Quick Application wizard of Qt Creator.
-# The code below adds the QmlApplicationViewer to the project and handles the
-# activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += declarative
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-defineTest(minQtVersion) {
- maj = $$1
- min = $$2
- patch = $$3
- isEqual(QT_MAJOR_VERSION, $$maj) {
- isEqual(QT_MINOR_VERSION, $$min) {
- isEqual(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- greaterThan(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- }
- greaterThan(QT_MINOR_VERSION, $$min) {
- return(true)
- }
- }
- return(false)
-}
-
-contains(DEFINES, QMLJSDEBUGGER) {
- CONFIG(debug, debug|release) {
- !minQtVersion(4, 7, 1) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("This library requires Qt 4.7.1 or newer.")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else:isEmpty(QMLJSDEBUGGER_PATH) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("Please specify its location on the qmake command line, eg")
- warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
- }
- } else {
- DEFINES -= QMLJSDEBUGGER
- }
-}
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemsources = $${item}.sources
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-symbian {
- ICON = $${TARGET}.svg
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
- contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
-} else:win32 {
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$eval($${deploymentfolder}.source)
- pathSegments = $$split(source, /)
- sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
- copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- installPrefix = /opt/usr
- desktopfile.path = /usr/share/applications/hildon
- } else {
- installPrefix = /usr/local
- desktopfile.path = /usr/share/applications
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- copyCommand += && $(MKDIR) $$target
- copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
- icon.files = $${TARGET}.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- desktopfile.files = $${TARGET}.desktop
- target.path = $${installPrefix}/bin
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- export(target.path)
- INSTALLS += desktopfile icon target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/declarative/modelviews/webview/inlinehtml.qml b/examples/declarative/modelviews/webview/inlinehtml.qml
deleted file mode 100644
index 1b0c15e1f3..0000000000
--- a/examples/declarative/modelviews/webview/inlinehtml.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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 1.0
-import QtWebKit 1.0
-
-// Inline HTML with loose formatting can be
-// set on the html property.
-WebView {
- html:"\
- <body>
- <table border=1>
- <tr><th><th>One<th>Two<th>Three
- <tr><th>1<td>X<td>1<td>X
- <tr><th>2<td>0<td>X<td>0
- <tr><th>3<td>X<td>1<td>X
- </table>"
-}
diff --git a/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro
index 86cdd1e325..7accabe97f 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro
+++ b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro
@@ -1,5 +1,5 @@
# Add more folders to ship with the application, here
-folder_01.source = qml
+folder_01.source = qml/inlinehtml
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
@@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEF18EEF4
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/webview.qmlproject b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.qmlproject
index d4909f8685..046124bade 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/webview.qmlproject
+++ b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.qmlproject
@@ -3,13 +3,13 @@ import QmlProject 1.0
Project {
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
- directory: "."
+ directory: "qml/inlinehtml"
}
JavaScriptFiles {
- directory: "."
+ directory: "qml/inlinehtml"
}
ImageFiles {
- directory: "."
+ directory: "qml/inlinehtml"
}
/* List of plugin directories passed to QML runtime */
// importPaths: [ " ../exampleplugin " ]
diff --git a/examples/declarative/modelviews/webview/inlinehtml/main.cpp b/examples/declarative/modelviews/webview/inlinehtml/main.cpp
index bb57ec67e6..cb324e6411 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/main.cpp
+++ b/examples/declarative/modelviews/webview/inlinehtml/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/qml/inlinehtml.qml"));
+ viewer.setMainQmlFile(QLatin1String("qml/inlinehtml/inlinehtml.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/alerts.html b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.html
index 82caddf7fb..82caddf7fb 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/alerts.html
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.html
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/alerts.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.qml
index 4aa4a3bc75..4aa4a3bc75 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/alerts.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/alerts.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/autosize.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/autosize.qml
index 7e10403f8f..7e10403f8f 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/autosize.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/autosize.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/Map.qml
index 9a865795e0..9a865795e0 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/Map.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/map.html b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/map.html
index a98da5430f..a98da5430f 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/Mapping/map.html
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/cancel.png b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/cancel.png
index ecc95331f2..ecc95331f2 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/ok.png b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/ok.png
index 5795f04fbf..5795f04fbf 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/googlemaps.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/googlemaps.qml
index aed0ddd025..aed0ddd025 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/googlemaps.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/googlemaps.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/inlinehtml.qml
index afc1fa93d3..afc1fa93d3 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/inlinehtml.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.html b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.html
index f169599387..f169599387 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.html
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.html
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.qml b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.qml
index 52f7a0b4dd..52f7a0b4dd 100644
--- a/examples/declarative/modelviews/webview/inlinehtml/qml/newwindows.qml
+++ b/examples/declarative/modelviews/webview/inlinehtml/qml/inlinehtml/newwindows.qml
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 411a04c139..0000000000
--- a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x28c7 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qmlapplicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
-#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
-
-#if defined(QMLJSDEBUGGER)
-
-// Enable debugging before any QDeclarativeEngine is created
-struct QmlJsDebuggingEnabler
-{
- QmlJsDebuggingEnabler()
- {
- QDeclarativeDebugHelper::enableDebugging();
- }
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-static QmlJsDebuggingEnabler enableDebuggingHelper;
-
-#endif // QMLJSDEBUGGER
-
-class QmlApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInShareDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../share/")
- + QFileInfo(QCoreApplication::applicationFilePath()).fileName()
- + QLatin1Char('/') + path;
- if (QFileInfo(pathInShareDir).exists())
- return pathInShareDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
-}
-
-void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
-{
-#ifdef Q_OS_SYMBIAN
- if (orientation != ScreenOrientationAuto) {
-#if defined(ORIENTATIONLOCK)
- const CAknAppUiBase::TAppUiOrientation uiOrientation =
- (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
- : CAknAppUi::EAppUiOrientationLandscape;
- CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
- TRAPD(error,
- if (appUi)
- appUi->SetOrientationL(uiOrientation);
- );
- Q_UNUSED(error)
-#else // ORIENTATIONLOCK
- qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
-#endif // ORIENTATIONLOCK
- }
-#elif defined(Q_WS_MAEMO_5)
- Qt::WidgetAttribute attribute;
- switch (orientation) {
- case ScreenOrientationLockPortrait:
- attribute = Qt::WA_Maemo5PortraitOrientation;
- break;
- case ScreenOrientationLockLandscape:
- attribute = Qt::WA_Maemo5LandscapeOrientation;
- break;
- case ScreenOrientationAuto:
- default:
- attribute = Qt::WA_Maemo5AutoOrientation;
- break;
- }
- setAttribute(attribute, true);
-#else // Q_OS_SYMBIAN
- Q_UNUSED(orientation);
-#endif // Q_OS_SYMBIAN
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index f5b24b0199..0000000000
--- a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x5a59 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
- void setOrientation(ScreenOrientation orientation);
- void showExpanded();
-
-private:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index 1c0c7edb39..0000000000
--- a/examples/declarative/modelviews/webview/inlinehtml/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,154 +0,0 @@
-# checksum 0x3dc8 version 0x2000a
-# This file was generated by the Qt Quick Application wizard of Qt Creator.
-# The code below adds the QmlApplicationViewer to the project and handles the
-# activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += declarative
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-defineTest(minQtVersion) {
- maj = $$1
- min = $$2
- patch = $$3
- isEqual(QT_MAJOR_VERSION, $$maj) {
- isEqual(QT_MINOR_VERSION, $$min) {
- isEqual(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- greaterThan(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- }
- greaterThan(QT_MINOR_VERSION, $$min) {
- return(true)
- }
- }
- return(false)
-}
-
-contains(DEFINES, QMLJSDEBUGGER) {
- CONFIG(debug, debug|release) {
- !minQtVersion(4, 7, 1) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("This library requires Qt 4.7.1 or newer.")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else:isEmpty(QMLJSDEBUGGER_PATH) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("Please specify its location on the qmake command line, eg")
- warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
- }
- } else {
- DEFINES -= QMLJSDEBUGGER
- }
-}
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemsources = $${item}.sources
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-symbian {
- ICON = $${TARGET}.svg
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
- contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
-} else:win32 {
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$eval($${deploymentfolder}.source)
- pathSegments = $$split(source, /)
- sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
- copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- installPrefix = /opt/usr
- desktopfile.path = /usr/share/applications/hildon
- } else {
- installPrefix = /usr/local
- desktopfile.path = /usr/share/applications
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- copyCommand += && $(MKDIR) $$target
- copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
- icon.files = $${TARGET}.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- desktopfile.files = $${TARGET}.desktop
- target.path = $${installPrefix}/bin
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- export(target.path)
- INSTALLS += desktopfile icon target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/declarative/modelviews/webview/newwindows.qml b/examples/declarative/modelviews/webview/newwindows.qml
deleted file mode 100644
index 07954f4a96..0000000000
--- a/examples/declarative/modelviews/webview/newwindows.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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$
-**
-****************************************************************************/
-
-// Demonstrates opening new WebViews from HTML
-//
-// Note that to open windows from JavaScript, you will need to
-// allow it on WebView with settings.javascriptCanOpenWindows: true
-
-import QtQuick 1.0
-import QtWebKit 1.0
-
-Grid {
- columns: 3
- id: pages
- height: 300; width: 600
-
- Component {
- id: webViewPage
- Rectangle {
- width: webView.width
- height: webView.height
- border.color: "gray"
-
- WebView {
- id: webView
- newWindowComponent: webViewPage
- newWindowParent: pages
- url: "newwindows.html"
- }
- }
- }
-
- Loader { sourceComponent: webViewPage }
-}
diff --git a/examples/declarative/modelviews/webview/newwindows/main.cpp b/examples/declarative/modelviews/webview/newwindows/main.cpp
index 6be8235a0c..92a6e9406a 100644
--- a/examples/declarative/modelviews/webview/newwindows/main.cpp
+++ b/examples/declarative/modelviews/webview/newwindows/main.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/qml/newwindows.qml"));
+ viewer.setMainQmlFile(QLatin1String("qml/newwindows/newwindows.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/declarative/modelviews/webview/newwindows/newwindows.pro b/examples/declarative/modelviews/webview/newwindows/newwindows.pro
index 0ade74b799..d1535617eb 100644
--- a/examples/declarative/modelviews/webview/newwindows/newwindows.pro
+++ b/examples/declarative/modelviews/webview/newwindows/newwindows.pro
@@ -1,5 +1,5 @@
# Add more folders to ship with the application, here
-folder_01.source = qml
+folder_01.source = qml/newwindows
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
@@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEE16E439
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
diff --git a/examples/declarative/modelviews/webview/newwindows/newwindows.qmlproject b/examples/declarative/modelviews/webview/newwindows/newwindows.qmlproject
new file mode 100644
index 0000000000..dd58cbfaa5
--- /dev/null
+++ b/examples/declarative/modelviews/webview/newwindows/newwindows.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "qml/newwindows"
+ }
+ JavaScriptFiles {
+ directory: "qml/newwindows"
+ }
+ ImageFiles {
+ directory: "qml/newwindows"
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/alerts.html b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.html
index 82caddf7fb..82caddf7fb 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/alerts.html
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.html
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/alerts.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.qml
index 4aa4a3bc75..4aa4a3bc75 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/alerts.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/alerts.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/autosize.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/autosize.qml
index 7e10403f8f..7e10403f8f 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/autosize.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/autosize.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/Map.qml
index 9a865795e0..9a865795e0 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/Map.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/map.html b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/map.html
index a98da5430f..a98da5430f 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/Mapping/map.html
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/content/pics/cancel.png b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/cancel.png
index ecc95331f2..ecc95331f2 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/content/pics/ok.png b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/ok.png
index 5795f04fbf..5795f04fbf 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/googlemaps.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/googlemaps.qml
index aed0ddd025..aed0ddd025 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/googlemaps.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/googlemaps.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/inlinehtml.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/inlinehtml.qml
index afc1fa93d3..afc1fa93d3 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/inlinehtml.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/inlinehtml.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/newwindows.html b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.html
index f169599387..f169599387 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/newwindows.html
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.html
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/newwindows.qml b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.qml
index 52f7a0b4dd..52f7a0b4dd 100644
--- a/examples/declarative/modelviews/webview/newwindows/qml/newwindows.qml
+++ b/examples/declarative/modelviews/webview/newwindows/qml/newwindows/newwindows.qml
diff --git a/examples/declarative/modelviews/webview/newwindows/qml/webview.qmlproject b/examples/declarative/modelviews/webview/newwindows/qml/webview.qmlproject
deleted file mode 100644
index d4909f8685..0000000000
--- a/examples/declarative/modelviews/webview/newwindows/qml/webview.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 411a04c139..0000000000
--- a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x28c7 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qmlapplicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
-#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
-
-#if defined(QMLJSDEBUGGER)
-
-// Enable debugging before any QDeclarativeEngine is created
-struct QmlJsDebuggingEnabler
-{
- QmlJsDebuggingEnabler()
- {
- QDeclarativeDebugHelper::enableDebugging();
- }
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-static QmlJsDebuggingEnabler enableDebuggingHelper;
-
-#endif // QMLJSDEBUGGER
-
-class QmlApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInShareDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../share/")
- + QFileInfo(QCoreApplication::applicationFilePath()).fileName()
- + QLatin1Char('/') + path;
- if (QFileInfo(pathInShareDir).exists())
- return pathInShareDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
-}
-
-void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
-{
-#ifdef Q_OS_SYMBIAN
- if (orientation != ScreenOrientationAuto) {
-#if defined(ORIENTATIONLOCK)
- const CAknAppUiBase::TAppUiOrientation uiOrientation =
- (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
- : CAknAppUi::EAppUiOrientationLandscape;
- CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
- TRAPD(error,
- if (appUi)
- appUi->SetOrientationL(uiOrientation);
- );
- Q_UNUSED(error)
-#else // ORIENTATIONLOCK
- qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
-#endif // ORIENTATIONLOCK
- }
-#elif defined(Q_WS_MAEMO_5)
- Qt::WidgetAttribute attribute;
- switch (orientation) {
- case ScreenOrientationLockPortrait:
- attribute = Qt::WA_Maemo5PortraitOrientation;
- break;
- case ScreenOrientationLockLandscape:
- attribute = Qt::WA_Maemo5LandscapeOrientation;
- break;
- case ScreenOrientationAuto:
- default:
- attribute = Qt::WA_Maemo5AutoOrientation;
- break;
- }
- setAttribute(attribute, true);
-#else // Q_OS_SYMBIAN
- Q_UNUSED(orientation);
-#endif // Q_OS_SYMBIAN
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index f5b24b0199..0000000000
--- a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
-
-// checksum 0x5a59 version 0x2000a
-/*
- This file was generated by the Qt Quick Application wizard of Qt Creator.
- QmlApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
- void setOrientation(ScreenOrientation orientation);
- void showExpanded();
-
-private:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index 1c0c7edb39..0000000000
--- a/examples/declarative/modelviews/webview/newwindows/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,154 +0,0 @@
-# checksum 0x3dc8 version 0x2000a
-# This file was generated by the Qt Quick Application wizard of Qt Creator.
-# The code below adds the QmlApplicationViewer to the project and handles the
-# activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += declarative
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-defineTest(minQtVersion) {
- maj = $$1
- min = $$2
- patch = $$3
- isEqual(QT_MAJOR_VERSION, $$maj) {
- isEqual(QT_MINOR_VERSION, $$min) {
- isEqual(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- greaterThan(QT_PATCH_VERSION, $$patch) {
- return(true)
- }
- }
- greaterThan(QT_MINOR_VERSION, $$min) {
- return(true)
- }
- }
- return(false)
-}
-
-contains(DEFINES, QMLJSDEBUGGER) {
- CONFIG(debug, debug|release) {
- !minQtVersion(4, 7, 1) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("This library requires Qt 4.7.1 or newer.")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else:isEmpty(QMLJSDEBUGGER_PATH) {
- warning()
- warning("Disabling QML debugging:")
- warning()
- warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
- warning("Please specify its location on the qmake command line, eg")
- warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
- warning()
- DEFINES -= QMLJSDEBUGGER
- } else {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
- }
- } else {
- DEFINES -= QMLJSDEBUGGER
- }
-}
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemsources = $${item}.sources
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-symbian {
- ICON = $${TARGET}.svg
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
- contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
-} else:win32 {
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$eval($${deploymentfolder}.source)
- pathSegments = $$split(source, /)
- sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
- copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- installPrefix = /opt/usr
- desktopfile.path = /usr/share/applications/hildon
- } else {
- installPrefix = /usr/local
- desktopfile.path = /usr/share/applications
- !isEqual(PWD,$$OUT_PWD) {
- copyCommand = @echo Copying application data...
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- copyCommand += && $(MKDIR) $$target
- copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
- }
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
- icon.files = $${TARGET}.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- desktopfile.files = $${TARGET}.desktop
- target.path = $${installPrefix}/bin
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- export(target.path)
- INSTALLS += desktopfile icon target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/declarative/modelviews/webview/webview.qmlproject b/examples/declarative/modelviews/webview/webview.qmlproject
deleted file mode 100644
index d4909f8685..0000000000
--- a/examples/declarative/modelviews/webview/webview.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}