summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-09 15:06:08 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-09 15:06:08 +0200
commit518a4668666f64a9ad996ac797bdaa676c54fd41 (patch)
tree13788304bb40ad8778c0800b31ef64d723d67a99 /tools
parente7dad7eb61399d06916b1ee803ad995272c760cb (diff)
parentafa01e3ef7cb367c1becbde16aa065f10e7b6c1f (diff)
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: (29 commits) Small optimization when checking if MouseArea's onPressAndHold is Fix autotest. Fixed `nmake clean' breaking declarative imports on Windows. Fix drawing flicker on Qml Viewer startup 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. ...
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.cpp36
4 files changed, 31 insertions, 27 deletions
diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
index a13b912a34..e7c70d5fde 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 fe73868486..817bfc8528 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 501ff79ef4..7948e2addb 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 f68130332d..676881d0ea 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]);
@@ -799,11 +804,11 @@ void QDeclarativeViewer::statusChanged()
tester->executefailure();
if (canvas->status() == QDeclarativeView::Ready) {
- initialSize = canvas->sizeHint();
+ initialSize = canvas->initialSize();
if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
- updateSizeHints();
if (!isFullScreen() && !isMaximized()) {
resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight()));
+ updateSizeHints();
}
}
}
@@ -936,7 +941,7 @@ void QDeclarativeViewer::sceneResized(QSize size)
if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
updateSizeHints();
}
- }
+ }
}
void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
@@ -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()
@@ -1259,7 +1264,6 @@ void QDeclarativeViewer::updateSizeHints()
setMinimumSize(QSize(0,0));
setMaximumSize(QSize(16777215,16777215));
}
- updateGeometry();
}
void QDeclarativeViewer::registerTypes()