summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-17 06:46:48 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-17 06:46:48 (GMT)
commit4406cbb0bdec5a676afb3f5f130e7ac5128198c0 (patch)
tree4df2a79f2c0febbed19e92c24cf2cccbaeab4388 /tools
parente50c80368dc6231d1cbcc605e2c8e86cb47203c6 (diff)
parent0f71215693713fef4fd9dabeae8e6a574deff415 (diff)
downloadQt-4406cbb0bdec5a676afb3f5f130e7ac5128198c0.zip
Qt-4406cbb0bdec5a676afb3f5f130e7ac5128198c0.tar.gz
Qt-4406cbb0bdec5a676afb3f5f130e7ac5128198c0.tar.bz2
Merge branch '4.7' into friday
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()) {