summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbdrag.h
Commit message (Collapse)AuthorAgeFilesLines
* xcb: Add support for XdndActionList propertyAlexander Volkov2020-03-231-1/+14
| | | | | | | | | | This allows to pass and receive possible drop actions from other processes, including GTK applications. Fixes: QTBUG-75744 Change-Id: I944edc6fa00f8801a25912e70eb104a647a9fc0e Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* More nullptr usage in headersKevin Funk2019-03-141-2/+2
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* xcb: account for misbehaving Unity DnD ManagerGatis Paeglis2018-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... which may cause dnd data to be lost. As soon as Unity sees that dnd operation has started (it monitors for changes on XdndSelection) it creates an invisible window named XdndCollectionWindowImp that fill entire screen and starts to act as DnD target. Once it has fetched the mime data it moves XdndCollectionWindowImp away without sending any DnD termination events. XdndCollectionWindowImp does not respect the XDnD protocol. Only when its gone we can start a normal dnd operation - looking for real DnD target. We ask windows if they are XdndAware on the initial mouse press and subsequent mouse move events. This patch sets a cursor to Qt::ForbiddenCursor while DnD is interfered by XdndCollectionWindowImp. A user will see the real DnD action (reflected by cursor) only after the next mouse move when XdndCollectionWindowImp has stopped interfering. We also setCanDrop(false) while DnD target is XdndCollectionWindowImp. Temporary seeing ForbiddenCursor is better than losing DnD data. Dropping in this state means that drop will simply be ignored. It is unclear what Unity developers expected DnD source window to do when user releases mouse while XdndCollectionWindowImp is stealing the data. Looking at Unity code, it appears that they were hoping to be quick enough that it would never happen. Task-number: QTBUG-49464 Change-Id: I10880073f6d843572be44fe9a3c4f78194466299 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: qxcbdrag.cpp cleanupsGatis Paeglis2018-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | - moved finding of XdndAware target logic in its own function to reduce size of QXcbDrag::move(). - switched to use categorized logging with more consistent logging messages - added more comments to avoid constatly looking at the specification for the meanings of Xdnd* actions and who sends/receives the action. - removed dead code (findXdndAwareParent), which should have been removed in 269fdbdd2bedda5f5eacb751224d3a3fc3eed5bc when reimplementing this logic in XCB. - removed needless reseting of state variables in various places as this is handled in QXcbDrag::init() on DnD start. - renamed variable in QXcbDrag::dndEnable(): xdnd_widget -> window - and other minor cleanups Change-Id: Ib667f80ceb4c07b7409a90c041044c98665877f3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-071-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-291-4/+2
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | qpa: improve API to support DnDs from other processesGatis Paeglis2018-05-041-4/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of using a hack of directly accessing QGuiApplication members. The current QPA API was bad for two reasons: 1) It expects platform plugin authors to know about internals of Qt Gui, particularly that QGuiApplication uses QGuiApplication::{mouseButtons,keyboardModifiers} to construct QDragMoveEvent and QDropEvent events. Which results in the second reason why this is bad. 2) Platform plugins should not directly access member variables of QGuiApplication, just to make sure that QDragMoveEvent and QDropEvent events contain correct state. Platform plugins should instead use QWindowSystemInterface to communicate with Qt Gui (which is also the solution here). The solution is to extend QWindowSystemInterface::handle{Drag,Drop} to require mouse/keyboard state. We already do this for some of the other methods, so it is nothing extraordinary. This type of interface is also _required_ to support drag-n-drops from other processes. We can't use QGuiApplication::{mouseButtons,keyboardModifiers} when the drag originates from another process, instead we need to query mouse/keyboard state from the system. This patch fixes drag-n-drops from others processes on XCB platform plugin. Task-number: QTBUG-57168 Change-Id: I3f8b0d2f76e9a32ae157622fef801829d629921d Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-051-0/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| * xcb: Set executed drop action when drop is outside the applicationBłażej Szczygieł2017-11-291-0/+4
| | | | | | | | | | | | Task-number: QTBUG-62815 Change-Id: I13ee1a3a7e9515d827d29ada38bc0d396f4800d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Remove QPlatformDrag::platformDropDataAlbert Astals Cid2017-03-131-2/+1
|/ | | | | | | | | | | | Its only uses were: * Call it to just store it in QDragManager::QDragManager * qnsview.mm calls it but since it knows it's a QCocoaDrag it can just call a function of that class directly * qxcbdrag.cpp calls it but since it basically was calling itself can just use the class member directly Change-Id: Ic7797c877d77f944a1212a7ea01173393bf903fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* xcb: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-011-9/+9
| | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual' keywords. Change-Id: Ia40be0e1e60e51f9d043ab575fd6b9305ea620b0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: mark some types as movable/primitiveMarc Mutz2016-08-171-0/+2
| | | | | | | These are all held in Qt containers. Change-Id: Ie285887b285bbcc0b70962d9f9c52d22d213d022 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * QXcbDrag: forward mouse release event to initiator windowAlberto Mardegan2016-05-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The mouse release event which ends the drag and drop operation must be forwarded to the window where the drag started, and not to the QShapedPixmapWindow, which is not supposed to handle input events. Task-number: QTBUG-52541 Change-Id: I24a7c7b331a06342ac28b420ff9467aa05fe00dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-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: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* xcb: Fix DnD for separate X screensAlexander Volkov2015-10-091-1/+1
| | | | | | | | Recreate QShapedPixmapWindow when the cursor goes to another X screen. Change-Id: Ifd4c4281971b23abc45a9f6c0509832a45c31521 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* xcb: Always send dnd events to the proxy window if it existsAlexander Volkov2015-09-221-1/+1
| | | | | | | | | The standard http://www.newplanetsoftware.com/xdnd/ says: "The only place where the proxy window should be used is when checking XdndAware and in the calls to XSendEvent()". Change-Id: I62e504ba52ec7ec2a941c53a84889bb3eb4b4cc1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix highdpi drag-n-drop for X11Paul Olav Tvete2015-07-301-9/+8
| | | | | | Task-number: QTBUG-46615 Change-Id: Iad548e62a580d6fbd15b7a826116a53ce23b4b8b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove QT_DEVICE_PIXEL_RATIO support from xcbPaul Olav Tvete2015-07-291-0/+1
| | | | | | | | It will be reintroduced as a cross-platform feature. Task-number: QTBUG-46615 Change-Id: Ia6d03275018b2a25ebed438fe51f15e491f1c3ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Fix drag and drop regressionGatis Paeglis2015-01-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d Add QPlatformDrag::ownsDragObject() function, QDragManager can use the return value of this function to decide if it should take care of deleting QDrag object or platform plugin will take care of deleting QDrag. XCB platform plugins uses async dnd data delivery mechanism. It allows user to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are, which means that a source window should preserve QDrag data until dnd has finished. Change-Id: I1fbad7380cddec98b756698993dd397409833150 Task-number: QTBUG-43436 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-7/+7
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-241-1/+1
|\ | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * [XCB] Fix crash in QML drag-and-dropGatis Paeglis2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use QPointer to make sure that we are not trying to destroy already deleted object. Task-number: QTBUG-35702 Change-Id: Ib746996787488e636f25e6ea5be0571607ee2ded Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | xcb: replace inefficient uses of QList with QVectorMarc Mutz2014-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | xcb atoms are uint32s, so a QList of them wastes 50% memory on 64-bit platforms. Other parts of the code already store xcb_atom_t's in QVector, so use QVector everywhere (also leads to less code expansion). Change-Id: Ib4afb35e499577a7509d04a18b830d9b31f6abd0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | xcb: replace a use of an inefficient QList with QVectorMarc Mutz2014-02-261-2/+1
|/ | | | | | | | | | The Transaction type is larger than a void*, so better use a vector to hold them. Change-Id: Ie2c00d053f67addbce6fd8107f659c56ccdd37aa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QBasicDrag and QSimpleDrag to QtGui.Samuel Rødal2013-05-301-1/+1
| | | | | | | | | | | | These are useful as default implementations of QPlatformIntegration::drag(), instead of having it return 0 which will lead to crashes in Qt Quick 2 and widgets applications that use drag and drop. Task-number: QTBUG-31288 Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Don't send QMouseEvent events from the QXcbDrag::timerEvent()Gatis Paeglis2013-05-131-2/+0
| | | | | | | | | | | | | | | | | | This is not needed. The DnD initiated scrolling is done by installing an eventFilter which forwards all MouseMove events to the QGuiApplicationPrivate::processDrag which creates and forwards all the necessary QDrag* events. QAbstractScrollArea has its own logic in the timerEvent() to make the view scroll when the pointer is standing still on the edge and the drag process is still ongoing. With the current implementation, widgets (during the DnD) were receiving DragMove events even when the pointer was standing still outside auto scroll areas. Task-number: QTBUG-28171 Change-Id: I355d88f3eab0ad39f916f84d66f5d0af7c0ff93e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify transaction expiry mechanismGatis Paeglis2012-10-131-1/+6
| | | | | | | | | | | | | | | | | | | | | This patch makes transaction mechanism less scattered around and conforms to the xdnd specification: Don't block and keep a history of previous data. This can be very difficult to implement, but it is clearly the ideal behavior from the user's perspective because it allows him to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are. When the source receives XdndFinished, it can remove the item from its history, thereby keeping it from getting too large. The source must also be prepared to throw out extremely old data in case a target malfunctions. I assume that 10min for drag-and-drop operation can be considered 'extremely' old data. Change-Id: I73dcd21aee3ad188d2260e49d80824da6ba040ab Task-numer: QTBUG-14493 Reviewed-by: David Faure (fixes for KDE) <faure@kde.org> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Stop delivering messages when drop has occurred.Gatis Paeglis2012-10-021-1/+1
| | | | | | | Task-number: QTBUG-27406 Change-Id: If14c108060ad6de70991658f0e0249eb544b87a0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Retrieve drop data with a proper timestampGatis Paeglis2012-10-021-0/+2
| | | | | | | | | | | Occasionally drag-and-drop was returning empty mimedata due to using wrong value for timestamp. Accoring to the xdnd specification we must use timestamp from XdndPosition or XdndDroptime for retrieving the data. Task-number: QTBUG-27367 Change-Id: Iadb6b6989cfc4e8ab241e2fd0ded59355108f22f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-1/+2
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix xcb plugin compilation for -qconfig largeTasuku Suzuki2012-05-261-0/+4
| | | | | | Change-Id: I1ee1fb9c140396e83272d607ee4dd63ce2c50b8d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* XShaping drag and drop fixesAlbert Astals Cid2012-05-101-1/+1
| | | | | | | | No shaping rectangles means no interaction with the window The shaping rectangles are based on the window coords, so need to substract the window coords when checking for the point Change-Id: Ic9004a8ec0f447cddcd1b4324d9fd60a94787cb9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Refactor the QPA dnd interface.Friedemann Kleint2012-02-291-19/+26
| | | | | | | | | | | | | | | - Give QPlatformDrag a synchronous drag() function returning the Qt::DropAction - Move the base functionality for asynchronous event handling to the platformsupport library as QBasicDrag (extendable base class handling drag icon and providing new virtuals) and QSimpleDrag (sample implementation for drag within the Qt application). - Change the Windows implementation accordingly. - Change XCB to be based on QBasicDrag. - Clean up QDragManager. Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixes to the Xdnd code in xcbLars Knoll2011-09-211-0/+1
| | | | | | | | | | Make sure we move the drag pixmap when required, and readd some commented out code from Qt 4.x. Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b Reviewed-on: http://codereview.qt-project.org/5262 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* cleanups codeLars Knoll2011-06-071-6/+3
| | | | | | | Make QXcbClipboard and QXcbDrag a QXcbObject to simplify the code. Use the predefined atoms in xproto.h instead of our own defines.
* Implement XDnD in the xcb pluginLars Knoll2011-06-071-3/+42
| | | | | | | | | Ported most of the code to support dragging from qdnd_x11.cpp to xcb. Some features are still not working 100% correct, but it's becoming usable. Reviewed-by: Samuel
* X11 DnD implementationLars Knoll2011-06-071-0/+122
Initial code for DnD on X11. Only Xdnd based, Motif DnD is being ignored. The code is currently limited to dropping stuff onto the application. Starting drags is not yet implemented. Reviewed-by: Samuel