diff options
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp | 16 | ||||
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro | 46 | ||||
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject | 6 | ||||
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc | 8 | ||||
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/qml/networkaccessmanagerfactory/view.qml (renamed from examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml) | 0 |
5 files changed, 52 insertions, 24 deletions
diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp index 665feac..3a73068 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp @@ -41,11 +41,9 @@ #include <QApplication> #include <QNetworkAccessManager> #include <QNetworkProxy> - #include <QDeclarativeEngine> #include <QDeclarativeNetworkAccessManagerFactory> -#include <QDeclarativeView> - +#include "qmlapplicationviewer.h" /* This example illustrates using a QDeclarativeNetworkAccessManagerFactory to @@ -78,9 +76,10 @@ QNetworkAccessManager *MyNetworkAccessManagerFactory::create(QObject *parent) int main(int argc, char ** argv) { - QUrl source("qrc:view.qml"); + QUrl source("qml/networkaccessmanagerfactory/view.qml"); QApplication app(argc, argv); + QmlApplicationViewer viewer; for (int i = 1; i < argc; ++i) { QString arg(argv[i]); @@ -97,11 +96,10 @@ int main(int argc, char ** argv) } } - QDeclarativeView view; - view.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory); - - view.setSource(source); - view.show(); + viewer.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory); + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); + viewer.setMainQmlFile(source.toString()); + viewer.showExpanded(); return app.exec(); } diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 74d8db3..66ce4b1 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,9 +1,39 @@ -TEMPLATE = app -TARGET = networkaccessmanagerfactory -DEPENDPATH += . -INCLUDEPATH += . -QT += declarative network - -# Input -SOURCES += main.cpp +# Add more folders to ship with the application, here +folder_01.source = qml/networkaccessmanagerfactory +folder_01.target = qml +DEPLOYMENTFOLDERS = folder_01 + +# Additional import path used to resolve QML modules in Creator's code model +QML_IMPORT_PATH = + +symbian:TARGET.UID3 = 0xE1CB8EBB + +# Smart Installer package's UID +# This UID is from the protected range and therefore the package will +# fail to install if self-signed. By default qmake uses the unprotected +# range value if unprotected UID is defined for the application and +# 0x2002CCCF value if protected UID is given to the application +#symbian:DEPLOYMENT.installer_header = 0x2002CCCF + +# Allow network access on Symbian +symbian:TARGET.CAPABILITY += NetworkServices + +# If your application uses the Qt Mobility libraries, uncomment the following +# lines and add the respective components to the MOBILITY variable. +# CONFIG += mobility +# MOBILITY += + +# Speed up launching on MeeGo/Harmattan when using applauncherd daemon +# CONFIG += qdeclarative-boostable + +# Add dependency to Symbian components +# CONFIG += qt-components +QT += network + +# The .cpp file which was generated for your project. Feel free to hack it. +SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc + +# Please do not modify the following two lines. Required for deployment. +include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +qtcAddDeployment() diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject index d4909f8..7f870a1 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.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/networkaccessmanagerfactory" } JavaScriptFiles { - directory: "." + directory: "qml/networkaccessmanagerfactory" } ImageFiles { - directory: "." + directory: "qml/networkaccessmanagerfactory" } /* List of plugin directories passed to QML runtime */ // importPaths: [ " ../exampleplugin " ] diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc index 17e9301..a5341c1 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc @@ -1,5 +1,5 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource> - <file>view.qml</file> -</qresource> +<RCC> + <qresource prefix="/"> + <file>qml/networkaccessmanagerfactory/view.qml</file> + </qresource> </RCC> diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/qml/networkaccessmanagerfactory/view.qml index e002ef6..e002ef6 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/qml/networkaccessmanagerfactory/view.qml |