From 4e6d901bf8dd8e709fd00506679e7dad67c33ded Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Wed, 25 Aug 2010 17:12:46 -0300 Subject: Modifyed declarative test to avoi use of network. Reviewer: Luciano Wolf Hugo Parente Lima --- tests/QtDeclarative/hw.qml | 55 +++++++++++++++++++++++++ tests/QtDeclarative/network.qml | 47 --------------------- tests/QtDeclarative/qdeclarativenetwork_test.py | 8 +--- 3 files changed, 56 insertions(+), 54 deletions(-) create mode 100644 tests/QtDeclarative/hw.qml delete mode 100644 tests/QtDeclarative/network.qml diff --git a/tests/QtDeclarative/hw.qml b/tests/QtDeclarative/hw.qml new file mode 100644 index 00000000..78c68ac5 --- /dev/null +++ b/tests/QtDeclarative/hw.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative 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$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + id: page + width: 500; height: 200 + color: "lightgray" + + Text { + id: helloText + text: "Hello world!" + y: 30 + anchors.horizontalCenter: page.horizontalCenter + font.pointSize: 24; font.bold: true + } +} diff --git a/tests/QtDeclarative/network.qml b/tests/QtDeclarative/network.qml deleted file mode 100644 index 4b849e07..00000000 --- a/tests/QtDeclarative/network.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative 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$ -** -****************************************************************************/ - -import Qt 4.7 - -Image { - width: 100 - height: 100 - source: "http://qt.nokia.com/logo.png" -} diff --git a/tests/QtDeclarative/qdeclarativenetwork_test.py b/tests/QtDeclarative/qdeclarativenetwork_test.py index a03a484a..459c422b 100644 --- a/tests/QtDeclarative/qdeclarativenetwork_test.py +++ b/tests/QtDeclarative/qdeclarativenetwork_test.py @@ -8,11 +8,6 @@ from PySide.QtNetwork import QNetworkAccessManager from helper import adjust_filename, TimedQApplication -class MyNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory): - def create(self, parent): - nam = QNetworkAccessManager(parent) - return nam - class TestQDeclarativeNetworkFactory(TimedQApplication): def setUp(self): @@ -21,9 +16,8 @@ class TestQDeclarativeNetworkFactory(TimedQApplication): def testQDeclarativeNetworkFactory(self): view = QDeclarativeView() - url = QUrl.fromLocalFile(adjust_filename('network.qml', __file__)) + url = QUrl.fromLocalFile(adjust_filename('hw.qml', __file__)) - view.engine().setNetworkAccessManagerFactory(MyNetworkAccessManagerFactory()) view.setSource(url) view.show() -- cgit