aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtDeclarative
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-25 17:12:46 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-25 17:32:12 -0300
commit4e6d901bf8dd8e709fd00506679e7dad67c33ded (patch)
treeba2035074259547bc92749b82d64ceb98d9ee9bc /tests/QtDeclarative
parente1d1a0cbd174976ed5e1634d0a9633499ea67dda (diff)
Modifyed declarative test to avoi use of network.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests/QtDeclarative')
-rw-r--r--tests/QtDeclarative/hw.qml (renamed from tests/QtDeclarative/network.qml)16
-rw-r--r--tests/QtDeclarative/qdeclarativenetwork_test.py8
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/QtDeclarative/network.qml b/tests/QtDeclarative/hw.qml
index 4b849e071..78c68ac5a 100644
--- a/tests/QtDeclarative/network.qml
+++ b/tests/QtDeclarative/hw.qml
@@ -40,8 +40,16 @@
import Qt 4.7
-Image {
- width: 100
- height: 100
- source: "http://qt.nokia.com/logo.png"
+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/qdeclarativenetwork_test.py b/tests/QtDeclarative/qdeclarativenetwork_test.py
index a03a484a0..459c422b2 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()