aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickdrag.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Build without the draganddrop featureAndy Shaw2018-06-251-2/+2
| | | | | Change-Id: I5e3a3ebd36d49fdf649eec5a3fb0a8fdb048ce0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-9/+9
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-2/+2
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQuickDragAttached: make hotSpot work with imageSourceOleg Yadrov2017-09-061-0/+1
| | | | | | | | | | | | This amends patch 4b982c744f538a24e21a2af146c45f93d27dd1cb. Previously, setting hotSpot had no effect on the image position because QDrag object used for the drag is created in startDrag(), and the hotspot was never updated before drag->exec(...). Task-number: QTBUG-61980 Change-Id: I9c11c456d3b32b5986cf287b2610437e3825d9d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-6/+6
| | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-2/+2
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-beta1Liang Qi2016-10-271-1/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I0b9e5bea5da5d2666887c202e62d889b4aa56900
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
| | * Fix documentation for dragFinished signalAndy Shaw2016-10-261-1/+1
| | | | | | | | | | | | | | | Change-Id: I9a38ab8ff60921e6d5ff6c2fa476b24d28781feb Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-1/+1
| |\| | | | | | | | | | Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
| | * QQuickDragAttached: set actual drag source when instantiating QDragAlberto Mardegan2016-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDrag's constructor parameter is used as drag source in a DnD operation; objects receiving QDrag{Enter,Move,Leave}Event will get this object when calling event->source(). Task-number: QTBUG-54195 Change-Id: Id3ed7e8d62a8539983c7c21c45f8f1d72f9a2e30 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents re-calculation of what actually changed, and removes the now unused parameter newGeometry. Other than this change calculation, the only place where oldGeometry was used is QQuickListViewPrivate::itemGeometryChanged. To get rid of oldGeometry too, QQuickListViewPrivate now stores the current (i.e. last known) geometry, and updates it in itemGeometryChanged. Change-Id: I8a5286d08a04132c9a4c81de7ce221f5676946e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-131-6/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-5/+6
| |\| | | | | | | | | | Change-Id: I3c6a93917cb46868cdb9dd50566b90c70f67102e
| | * QQuickDragAttached: fix updating of "active" propertyAlberto Mardegan2016-04-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The d->active member variable should be changed regardless of the value of Drag.dragType. Task-number: QTBUG-52540 Change-Id: I7fa39ccf11b1200e9c2f6fe57cba58657b6cff74 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| | * Set the private active variable to true and not the one passed inAndy Shaw2016-04-141-1/+1
| | | | | | | | | | | | | | | Change-Id: I953370e353eb0c67f086b3a539985701723798e9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | | Add imageSource property to attached Drag propertyAlberto Mardegan2016-05-071-3/+43
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property holds a URL which is loaded into a QPixmap via QQuickPixmap, and subsequently set on the QDrag object. This is especially important for drag and drop to external applications, where of course a QQuickItem cannot be dragged; however, combined with QQuickItem::grabToImage(), this change allows setting a QQuickItem's contents as the drag pixmap. [ChangeLog][QtQuick][Drag] Added imageSource property to attached Drag object: this allows drag sources to specify the pixmap to be drawn next to the mouse cursor when starting a drag and drop operation. Task-number: QTBUG-37366 Change-Id: Ibcf1d888c525e50976a116ec743ce6fca4c31525 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | V4: Allow some more functions to be inlined.Erik Verbruggen2016-03-311-0/+1
| | | | | | | | | | Change-Id: If9d1f87fd7cf0b12d2827c4574109234be7e8ab8 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Quick: fix expensive iteration over QHash::keys() and QMap::keys()Anton Kudryavtsev2016-01-181-3/+2
|/ | | | | Change-Id: I21c48214bfddde01f71710705fe01418818a6581 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Link to drag and drop examples in relevant placesMitch Curtis2015-12-161-0/+1
| | | | | | | | So users at least have some idea of how to use these types, as their documentation is quite lacking. Change-Id: Ic4644cc259fabbd1462e611316dcec3c5a0d2c4e Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Consistently use the override keywordThiago Macieira2015-07-191-1/+1
| | | | | | | Clang doesn't like when it's inconsistent. Change-Id: Ib306f8f647014b399b87ffff13f23eebda07757b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* XCB: respect QPlatformDrag::ownsDragObject().Mitch Curtis2015-04-211-1/+5
| | | | | | | | | | | | In a Qt Quick application on X11, QDrag events were deleted before their data could be passed to an external application. There was a function introduced recently to account for this problem, so we should use that instead. Change-Id: If74dd32bb8c7aa7c2e3160448af546d2e8640528 Task-number: QTBUG-45604 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-2/+2
| | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Doc: link issues qtdeclarativeNico Vertriest2015-02-041-2/+2
| | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I154ffa83512435c3e455937a3f81931a45d9e368 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-6/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/coreapi/qsgrenderer.cpp src/quick/scenegraph/qsgadaptationlayer.cpp src/quick/scenegraph/qsgrenderloop.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp src/quick/scenegraph/qsgwindowsrenderloop.cpp src/quick/scenegraph/util/qsgatlastexture.cpp src/quick/scenegraph/util/qsgtexture.cpp src/quick/util/qquickprofiler_p.h Change-Id: Ie274c3baf72a8a0711c87d67238d68e2b2887429
| * Improve Drag documentation.Mitch Curtis2014-09-111-6/+7
| | | | | | | | | | Change-Id: Ifba60b729c8ad02009cd5c8caa5d58e20a76c73b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-1/+1
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Introduce MouseArea.drag.smoothedKevin Funk2014-05-141-1/+13
| | | | | | | | | | | [ChangeLog][QtQuick] Added property MouseArea.drag.smoothed for toggling whether the drag target is moved to the current mouse position after a drag operation has started. Task-number: QTBUG-38539 Change-Id: I989b51bc83fc24c64b84ac8e9a50b352e674e8f8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix a link in QQuickDragAttached::dragType documentationJędrzej Nowacki2014-03-281-1/+1
| | | | | Change-Id: Ia704b3c84215b519e86a0aed884d89538ba7e4f9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Document signals (not handlers) under \qmlattachedsignalSze Howe Koh2014-03-281-5/+9
| | | | | | | | | | - They're not "attached properties" either. - Append the handler names to the end of the corresponding signal doc. - Update descriptions and links Task-number: QTBUG-35846 Change-Id: I54e93187b3209546ec344a20e0482c98d7f14109 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Docs: fix Drag::onDragStarted() and onDragFinished() signalsJ-P Nurmi2013-12-181-2/+2
| | | | | Change-Id: Iefda2d3611ed0f940255f1375ca4c356827fbc70 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix & cleanup whitespace in qquickdrag.cpp docsJ-P Nurmi2013-12-181-21/+19
| | | | | Change-Id: I85b986c8b3dca6ccc872807a1d2e8b7b71688c0e Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-15/+15
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QQmlV4Function API to be GC safeLars Knoll2013-09-261-7/+9
| | | | | Change-Id: Id4f79c22fc48ada1c8a9a858e1b7b3d1cf14d120 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-1/+1
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-2/+2
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Expose drag threshold in MouseAreaJens Bache-Wiig2013-09-131-2/+23
| | | | | | | | | | | | | | | | | | | | In several cases such as for creating a Slider, it is useful to have a 0 pixel threshold in order to initiate a drag operation. We have previously hardcoded this to a platform dependent (usually 10 pixel) value for MouseArea. Note that we have no way of indicating the version/revision number in a grouped property for documentation at the moment. In addition we deliberately had to remove the REVISION from the property because it is blocked by QTBUG-33179. However, since this is not a user-creatable type it should not cause any issues in practice. This patch adds MouseArea.drag.threshold in order to improve on this. Change-Id: Ia4871e64fab39e30c4494f00be99ad38cdd630df Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Add support for external drag and drop in Quick items.Chris Meyer2013-09-091-5/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dragType enums with values of None, Automatic, Internal (default). Setting to Automatic allows startDrag to be called automatically. Setting to Internal (default) retains old behavior. Add mimeData to Drag item to enable external drags. Call startDrag to start drag manually or change from internal drag to external drag. Added events dragStarted and dragFinished that get invoked from startDrag. Mime data must be specified in the mimeData property as mime-type / data pairs. Moved QQuickDrag from qquickmousearea* files to qquickdrag* files to reduce header interdependencies that caused linking errors in other modules and also to improve code organization. Allow DropArea to receive and process external data. Introduced new variable containsDrag to QQuickDropAreaPrivate. This replaces mimeData which was previously being used to determine if a drop operation was currently occurring. The problem was that mimeData was being externally destructed. Also introduced accessor methods for getting color, html, image, text, and urls out of the drop. This facilitates dropping of external data of those types onto a DropArea. Added example quick/externaldraganddrop. Task-number: QTBUG-27498 Change-Id: I1420df7c161ea3399e49a23305273e106baa246f Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-3/+3
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>