summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-09-16 22:00:18 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-16 22:00:18 (GMT)
commit0f71215693713fef4fd9dabeae8e6a574deff415 (patch)
tree27d8a11e29f87813df5cbb644389cbfdfebc1abb /tools
parentacab3259e9f57e436f475b4c0d1d7e7fb194e983 (diff)
parentfc007d0a99cc52e673c5d2606e5076831f6103b1 (diff)
downloadQt-0f71215693713fef4fd9dabeae8e6a574deff415.zip
Qt-0f71215693713fef4fd9dabeae8e6a574deff415.tar.gz
Qt-0f71215693713fef4fd9dabeae8e6a574deff415.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/qmlruntime.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index b38e80d..c59621a 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -692,12 +692,14 @@ QDeclarativeViewer::~QDeclarativeViewer()
void QDeclarativeViewer::enableExperimentalGestures()
{
+#ifndef QT_NO_GESTURES
canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
+#endif
}
QDeclarativeView *QDeclarativeViewer::view() const
@@ -1067,11 +1069,7 @@ void QDeclarativeViewer::loadDummyDataFiles(const QString& directory)
QStringList list = dir.entryList();
for (int i = 0; i < list.size(); ++i) {
QString qml = list.at(i);
- QFile f(dir.filePath(qml));
- f.open(QIODevice::ReadOnly);
- QByteArray data = f.readAll();
- QDeclarativeComponent comp(canvas->engine());
- comp.setData(data, QUrl());
+ QDeclarativeComponent comp(canvas->engine(), dir.filePath(qml));
QObject *dummyData = comp.create();
if(comp.isError()) {