summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativemousearea.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-13 13:06:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-13 13:06:33 (GMT)
commit28ef9731df2b3cd865af89cc474c5fa20c24e492 (patch)
treee02172bc3cc68f9b46be40e3a6b4d94bd8fbaf07 /src/declarative/graphicsitems/qdeclarativemousearea.cpp
parent271c231bbc6a5376d557378c425e6c35299fb88b (diff)
parent0f81945563441082551c65f964531c16e185d3de (diff)
downloadQt-28ef9731df2b3cd865af89cc474c5fa20c24e492.zip
Qt-28ef9731df2b3cd865af89cc474c5fa20c24e492.tar.gz
Qt-28ef9731df2b3cd865af89cc474c5fa20c24e492.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: (32 commits) Fix autotest on windows Fix worker ListModels to property emit countChanged() Update color type docs to mention transparency Update reference bitmaps used in bitmap comparison tests to follow changes in Text painting Fix alignment bugs in Text element Remove debug code added by 650a0078e2cef43eff107fe8d2505f64a0bfedf0 Compile on WinCE Update QtDeclarative def files Update QtCore def files Compile on MSVC2008 Bug: TextEdit ignores plain text format when pasting text Update sections if model content changes. Fix autotest on windows Test for absent qmldir Allow objectName to be used in QML bindings Install the declarative objectNameChanged callback Don't give focus to a FocusScope that has had focus explicitly cleared. Add a declarative callback for when a QObject's objectName changes Ensure GridView header is visible at the top of the view. Allow aliases to value type properties ...
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativemousearea.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index a0208ef..1533d55 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -557,6 +557,7 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
ungrabMouse();
setKeepMouseGrab(false);
}
+ d->doubleClick = false;
}
void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
@@ -565,14 +566,12 @@ void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *even
if (!d->absorb) {
QDeclarativeItem::mouseDoubleClickEvent(event);
} else {
+ d->doubleClick = true;
d->saveEvent(event);
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
me.setAccepted(d->isDoubleClickConnected());
emit this->doubleClicked(&me);
- if (!me.isAccepted()) {
- // Only deliver the press event if we haven't accepted the double click.
- QDeclarativeItem::mouseDoubleClickEvent(event);
- }
+ QDeclarativeItem::mouseDoubleClickEvent(event);
}
}
@@ -841,7 +840,8 @@ bool QDeclarativeMouseArea::setPressed(bool p)
d->pressed = p;
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
- emit pressed(&me);
+ if (!d->doubleClick)
+ emit pressed(&me);
me.setX(d->lastPos.x());
me.setY(d->lastPos.y());
emit mousePositionChanged(&me);
@@ -849,7 +849,7 @@ bool QDeclarativeMouseArea::setPressed(bool p)
emit released(&me);
me.setX(d->lastPos.x());
me.setY(d->lastPos.y());
- if (isclick && !d->longPress)
+ if (isclick && !d->longPress && !d->doubleClick)
emit clicked(&me);
}