summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-08 17:08:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-08 17:08:33 (GMT)
commit00b157dc4aad203e78b8e4d821470a1d01a195c0 (patch)
treee7756c85df4a4dd4dbac715173c44da4e71f39f3 /tools
parent2ae808a23ce05bf9768ad9df107c16bb0c555ee7 (diff)
parente5567b2e0513f5a03987f78df2d565c0e6c6a951 (diff)
downloadQt-00b157dc4aad203e78b8e4d821470a1d01a195c0.zip
Qt-00b157dc4aad203e78b8e4d821470a1d01a195c0.tar.gz
Qt-00b157dc4aad203e78b8e4d821470a1d01a195c0.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (25 commits) Fix snake demo Add qmlmethod Item::childAt() to delarative item Cursor positioning in QTextDocument after undo() Fix slow network access in qmlviewer (Windows) Don't layout multiple times when an ancestor becomes (in)visible. Add an example of animated item add/remove in ListView Add test for PropertyChanges with attached properties. Make declarative autotests compile on Symbian abld build system Accept enter key in the webbrower demo url input. Keep reported point/pixel size in sync. Remove unnecessary CloseSoftwareInputPanel events after TextEdit or TextInput has lost focus Ensure state operations assigned to the default state are triggered Add image example. Fix regression in input panel autotests Improve docs about Qml component case sensitivity. Add some performance tips to QML docs. Move QListModelInterface into util. Ensure ParticleMotionGravity always pulls in the right direction. Remove version ifdefs from Particles; only 4.7 is supported. Update docs for the runtime.orientation values ...
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/deviceorientation.cpp2
-rw-r--r--tools/qml/deviceorientation.h8
-rw-r--r--tools/qml/deviceorientation_maemo.cpp12
-rw-r--r--tools/qml/qmlruntime.cpp29
4 files changed, 28 insertions, 23 deletions
diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
index a13b912..e7c70d5 100644
--- a/tools/qml/deviceorientation.cpp
+++ b/tools/qml/deviceorientation.cpp
@@ -47,7 +47,7 @@ class DefaultDeviceOrientation : public DeviceOrientation
{
Q_OBJECT
public:
- DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::TopUp) {}
+ DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::Portrait) {}
Orientation orientation() const {
return m_orientation;
diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h
index fe73868..817bfc8 100644
--- a/tools/qml/deviceorientation.h
+++ b/tools/qml/deviceorientation.h
@@ -54,10 +54,10 @@ class DeviceOrientation : public QObject
public:
enum Orientation {
UnknownOrientation,
- TopUp,
- TopDown,
- LeftUp,
- RightUp
+ Portrait,
+ Landscape,
+ PortraitInverted,
+ LandscapeInverted
};
virtual Orientation orientation() const = 0;
diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp
index 501ff79..7948e2a 100644
--- a/tools/qml/deviceorientation_maemo.cpp
+++ b/tools/qml/deviceorientation_maemo.cpp
@@ -48,11 +48,11 @@ class MaemoOrientation : public DeviceOrientation
Q_OBJECT
public:
MaemoOrientation()
- : DeviceOrientation(),m_current(TopUp), m_lastSeen(TopUp), m_lastSeenCount(0)
+ : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0)
{
m_current = get();
if (m_current == UnknownOrientation)
- m_current = TopUp;
+ m_current = Portrait;
startTimer(100);
}
@@ -101,13 +101,13 @@ private:
if (abs(az) > 850) {
o = UnknownOrientation;
} else if (ax < -750) {
- o = LeftUp;
+ o = Portrait;
} else if (ax > 750) {
- o = RightUp;
+ o = PortraitInverted;
} else if (ay < -750) {
- o = TopUp;
+ o = Landscape;
} else if (ay > 750) {
- o = TopDown;
+ o = LandscapeInverted;
}
return o;
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index f681303..d95bec2 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -281,7 +281,12 @@ public:
ret << httpProxy;
return ret;
}
+#ifdef Q_OS_WIN
+ // systemProxyForQuery can take insanely long on Windows (QTBUG-10106)
+ return QNetworkProxyFactory::proxyForQuery(query);
+#else
return QNetworkProxyFactory::systemProxyForQuery(query);
+#endif
}
void setHttpProxy (QNetworkProxy proxy)
{
@@ -581,10 +586,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
orientation->setExclusive(true);
connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*)));
- orientation->addAction(tr("orientation: TopUp"));
- orientation->addAction(tr("orientation: LeftUp"));
- orientation->addAction(tr("orientation: TopDown"));
- orientation->addAction(tr("orientation: RightUp"));
+ orientation->addAction(tr("orientation: Portrait"));
+ orientation->addAction(tr("orientation: Landscape"));
+ orientation->addAction(tr("orientation: Portrait (Inverted)"));
+ orientation->addAction(tr("orientation: Landscape (Inverted)"));
QList<QAction *> actions = orientation->actions();
for (int i=0; i<actions.count(); i++) {
propertiesMenu->addAction(actions[i]);
@@ -1177,14 +1182,14 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
action->setChecked(true);
QString o = action->text().split(QLatin1Char(':')).value(1).trimmed();
- if (o == QLatin1String("TopUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopUp);
- else if (o == QLatin1String("TopDown"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopDown);
- else if (o == QLatin1String("LeftUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::LeftUp);
- else if (o == QLatin1String("RightUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::RightUp);
+ if (o == QLatin1String("Portrait"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
+ else if (o == QLatin1String("Landscape"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape);
+ else if (o == QLatin1String("Portrait (Inverted)"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted);
+ else if (o == QLatin1String("Landscape (Inverted)"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted);
}
void QDeclarativeViewer::orientationChanged()