summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Teach QPlatformWindow about safe area margins and implement for iOSTor Arne Vestbø2017-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. QWidget will incorporate the safe area margins into its contents margins, so that they are are never smaller than the safe area margins. This can be disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget attribute, which is set by default. QLayouts will automatically use the contents area of a widget for their layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This can be used, along with a contents margin of 0 on the actual layout, to allow e.g. a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area. [ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the device into account when computing layouts for QtWidgets. Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* / cleanup: remove redundant QGuiApplicationPrivate::buttonsGatis Paeglis2017-05-051-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable was introducing during Qt 5.0 Q{Gui}Application refactoring days (2011 or even before) and since then has been used interchangeably with QGuiApplicationPrivate::mouse_buttons. This patch removes the duplicate member variable as it is redundant and could be a source of potential errors. Initially I was thinking that ::buttons might be used for the purpose of QTestLib, but it is not. QTestLib delivers mouse events directly via qApp->notify() (mouse button state is update via QGuiApplicationPrivate::mouse_buttons from notify()), or via window system interface QWindowSystemInterface::handleMouseEvent (which goes through QGuiApplication::processMouseEvent). Looking at QGuiApplication, it is clear that ::buttons and ::mouse_buttons always have the same value, as there is only one assignment to these members in QGuiApplication: mouse_buttons = buttons = e->buttons; And there are no other places that would assign to QGuiApplicationPrivate::buttons. Change-Id: Ib60d366bf056a98b15bb4538a569693e7bd022e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-131-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * Close popups when blocked by modal dialogPaul Olav Tvete2016-11-301-0/+1
| | | | | | | | | | | | | | | | Don't block the event that Qt depends on to close popups. Task-number: QTBUG-57292 Change-Id: Ida1f928b81868f68a7b1e19cd0b83485d2a7232e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Replace QDrawHelperGammaTables with QColorProfileAllan Sandfeld Jensen2016-11-241-3/+5
|/ | | | | | | | | | | | Turns the two set of tables in QDrawHelperGammaTables into two QColorProfile classes that use similar structures and can be reused for other gamma correction. At the same time clean-up and improve the comma-correct blending code to use the new profiles and QRgba64 precision. Change-Id: I302bd87a5c836e1010fff6d633eeb56fd4ae2ff0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QWheelEvent: Make NoScrollPhase publicGabriel de Dietrich2016-03-211-3/+0
| | | | | | | | | | | | | This reverts d5fde514106f5479f9c929c8a165aced4a1b2c84 and makes that enum value the default for QWheelEvent::phase() with non phase-aware mice. [ChangeLog][QtGui] QWheelEvent::phase() returns NoScrollPhase with non phase-aware mice. This is most mice and input devices except, for now, Apple's trackpads and Magic Mouse. Change-Id: I929fb39889cf116e89dcd134c1b1ec6587b8f05e Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Q*Application: fix UB caused by accessing QGuiApplication from ↵Marc Mutz2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCoreApplication ctor As reported by ubsan: src/gui/kernel/qplatformintegration.cpp:463:10: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:14: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:43: runtime error: member call on address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' to name just a few which are reported when running gui and widget auto-tests; there're definitely more where these came from. This is caused by QCoreApplication::init() being called from the QCoreApplication ctor, calling virtual functions on Q*AppPrivate, which happen to attempt, in this case, to emit QGuiApp signals. At that point in time, the QGuiApplication ctor has not entered the constructor body, ergo the object is still a QCoreApplication, and calling the signal, as a member function on the derived class, invokes UB. Fix by cleaning up the wild mix of initialization functions used in this hierarchy. The cleanup restores the 1. Q*ApplicationPrivate::Q*ApplicationPrivate() 2. Q*ApplicationPrivate::init(), calling each base class' init() as the first thing two-stage construction pattern commonly used elsewhere in Qt to make sure that the public class' object is fully constructed by the time each level's Private::init() is called. Change-Id: I290402b3232315d7ed687c97e740bfbdbd3ecd1a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * QWheelEvent: make NoScrollPhase opt-inShawn Rutledge2016-03-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for QTBUG-50199 involves adding an undocumented enum value which can be returned from QWheelEvent::phase(). This will be quite unexpected for applications that use it, which work fine with 5.6.0 and then start receiving this new phase value in 5.6.1. So it should not happen by default. Set the env variable QT_ENABLE_MOUSE_WHEEL_TRACKING to enable this functionality. In 5.7 it will be default behavior. But in 5.6 the default behavior is as it was before: if you use a conventional mouse wheel, the phase stays at ScrollUpdate continuously. [ChangeLog][QtCore] QWheelEvent::phase() returns 0 rather than Qt::ScrollUpdate when the wheel event comes from an actual non-emulated mouse wheel and the environment variable QT_ENABLE_MOUSE_WHEEL_TRACKING is set. In Qt 5.6, this is required to enable the fix for QTBUG-50199. Change-Id: Ieb2152ff767df24c42730d201235d1225aaec832 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6.0' into 5.7v5.7.0-alpha1Oswald Buddenhagen2016-03-071-0/+1
|\ \ | | | | | | | | | Change-Id: Idcda6d52266f557ce4a819b6669f6797473a48a2
| * | Add option to disable "session management by closing windows".Andreas Hartmetz2016-02-151-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That feature is a poor man's session management for applications that do not implement any specific session management features. It badly interferes with proper session management support, so applications must be able to disable it. This enables fixing applications with QGuiApplication::quitOnLastWindowClosed() true - the default - dying too early, before they are enumerated for the list of applications to restart on session restore, thus preventing them from being restored. See https://bugs.kde.org/show_bug.cgi?id=354724 [ChangeLog][QtGui] Qt asking to close windows on session exit as a fallback session management mechanism has been made optional. Disabling it fixes session management for applications that implement full session management. See QGuiApplication::isFallbackSessionManagementEnabled(). Task-number: QTBUG-49667 Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.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>
* | Accept concurrent input from multiple tablet devices in QGuiApplicationRomain Pokrzywka2015-11-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to 352c357e6f0785c0775a85151d6716b47aea1006 enabling support for multiple evdevtablet plugins at runtime (one per device), we also need to adjust the way QGuiApplication handles the events received from those plugins, in particular when multiple devices are sending tablet events concurrently. Replace the static members in QGuiApplication by a vector storing the same data per-device, so tablet press/release events can be recognized independently. Change-Id: Ie0975cdb03a8f6d05903e2e2e57ceb9de73a74a4 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-181-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
| * move styleOverride from QApplicationPrivate to QGuiApplicationPrivateLiang Qi2015-11-131-0/+1
| | | | | | | | | | | | | | * -style option is also used in other cases than widget world Change-Id: I8555d309a7b9df0d26ad7a7b930411260537180e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-041-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * Fix QHighDPiScaling initialization issuesMorten Johan Sørvig2015-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Call QHighDpiScaling::updateHighDpiScaling() in init_plaform(), after the platform integration has been created and most platforms have populated the screen list. Keep the existing udpate call for the platforms that don't, but guard against calling it twice. Task-number: QTBUG-47947 Change-Id: Ib73bea7c4ab42e7acf6532f3a3100e1fc29acc2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Add QGuiApplication::setDesktopFileName()Pier Luigi Fiorini2015-08-271-0/+1
|/ | | | | | | | | | | | | | | | | | | | This property might be set by applications whose desktop entry file name cannot be determined by heuristics already in place. It is particularly useful for QtWayland as it can be used to determine the app_id simply by stripping the ".desktop" suffix from this property. Without a correct app_id, Wayland compositors won't be able to e.g. show the application icon on task managers. This property is also very interesting for X11 as there are various desktop environments trying to map windows to launchers. It will be possible to export desktopFileName as a xproperty, making such mapping less error prone. Change-Id: I0fef23f28f383639e625379ab46e36aecb338ac4 Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Fix use of the window geometry specificationAlexander Volkov2015-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now we applied the geometry in QWidget::setVisible() by calling QWidget::move() and QWidget::resize(). But these methods are unreliable when the window is created but not visible yet. For example, specifying the window position by "-geometry +0+0" will take no effect. Apply the geometry directly to QWindow in QWindow::setVisible(). QWidget will update its geometry after the response of the window system. Besides it allows to specify the geometry for QML applications. Task-number: QTBUG-44713 Change-Id: I9a0e110e81e569c81da802729707fec104fef887 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | eglfs: Generate enter and leave eventsLaszlo Agocs2015-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | In addition the logic in QGuiApplication that picks the target window for input events with a null window has to be enhanced to be compatible with how real windowing systems work: mouse events following a press are delivered to the same window until the release, even if the cursor has left the original target window. Task-number: QTBUG-44814 Change-Id: I3fea84ac77a5ccebeae5def64f92d8d2e03d13ff Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Fix crash when accessing QStyleHints before QGuiApplication is constructed.Friedemann Kleint2015-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Make styleHints a static member variable of QGuiApplicationPrivate and fix accessor accordingly. Extend tst_QApplication::settableStyleHints() to run without QApplication instance as well and add a similar test to QGuiApplication. Task-number: QTBUG-44499 Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@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>
* | remove stray QGuiApplicationPrivate::wheelEventSource declarationShawn Rutledge2015-02-081-2/+0
| | | | | | | | | | | | | | | | It is unimplemented and probably unnecessary. Unintentionally included in commit 74443d7bbb319e949928dd081fde04bccb5f7845. Change-Id: I3a1afb20e673fa0611b602a11ceca1953231ac14 Reviewed-by: Andrew Knight <qt@panimo.net>
* | Unify input device hotplugging support for embeddedLaszlo Agocs2015-01-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On embedded the mouse cursor will now appear and reappear regardless of how the input handling code is loaded (via a generic plugin or compiled-in to the platform plugin). Instead of passing around QDeviceDiscovery instances that only works when compiling-in the code into the platform plugin, introduce a new internal central QInputDeviceManager. The single instance of this provides a place to store any future input device related signals and properties. Also introduce mouse hotplugging support to linuxfb. [ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling hotplugging correctly with eglfs and linuxfb regardless of how the input handling code is loaded (via a generic plugin or built in to the platform plugin). Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Add QWheelEvent::sourceShawn Rutledge2015-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-1/+1
|/ | | | | | | | | | 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>
* Make the -nograb and -dograb arguments actually work on xcbJørgen Lind2014-11-111-1/+0
| | | | | Change-Id: Idc725443e4abe27db3e530f08173897bfcbe1278 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.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>
* qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-101-1/+0
| | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add an option to share between TLWsLaszlo Agocs2014-09-101-0/+2
| | | | | | Task-number: QTBUG-41191 Change-Id: I510d1631926ed0d9e371703d22229aed92432aa6 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* add buttons to QTabletEventShawn Rutledge2014-07-281-1/+1
| | | | | | | | | | | | | Until now, it has been necessary for tablet-oriented applications which care about multi-button styli to reject each tablet event and wait for the mouse event in order to know which buttons are pressed. This patch adds the new API and also the X11/xcb implementation. [ChangeLog][QtCore][Tablet support] Added buttons to QTabletEvent Task-number: QTBUG-39458 Change-Id: If2c9ec1ceacc1700a82686c5fc6f568f9111055a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add support for -qwindowicon command line argument.David Faure2014-05-021-0/+1
| | | | | | | | | [ChangeLog][QtGui][QGuiApplication] Add support for -icon command line argument on X11, add -qwindowicon on all platforms. Change-Id: Iacc602466699bf634d8b34aab7ed73c83fd9844f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* OS X: Add support for ApplicationState capabilitySamuel Gaist2014-04-241-1/+1
| | | | | | | | | | | | | | | | Currently a click on e.g. the dock icon is not propagated to the application so if for example the main widget is hidden, it can't be brought back. Also neither applicationDidBecomeActive nor applicationDidResignActive do anything. This patch fixes it [ChangeLog][QPA][OS X] Add support for ApplicationState capability. Application can now detect when an application states has changed as well when the dock icon has been clicked. Task-number: QTBUG-10899 Change-Id: I53d3e6eed4adc62b343e7aa3e3d8068d3248e7df Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Close widgets properly from session management.Friedemann Kleint2014-02-141-0/+2
| | | | | | | | | | | | | | | | Introduce new virtual QGuiApplicationPrivate::tryCloseAllWindows() which allows overriding the behavior in QApplication to properly close the widgets first. Without this, QGuiApplication closes the widget windows leaving a stale window handle behind in the associated QWidget which then causes the application not to terminate since QApplication::shouldQuit() stills finds the affected widgets to be visible. Task-number: QTBUG-35986 Change-Id: I19ac4b5a19250ee68d09e461c03dbace458c98e4 Reviewed-by: David Faure <david.faure@kdab.com>
* Move setWindowIcon() up to QGuiApplication.David Faure2014-02-121-0/+3
| | | | | | | | | | [ChangeLog][QtGui][QWindow]QWindow::icon() now defaults to the application icon, which can be set with QGuiApplication::setWindowIcon(). Change-Id: Id1974e5cda81775e515c14b294f67fb99351c6c9 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Restore support for -title command line argument on X11, add -qwindowtitle.David Faure2014-02-121-0/+2
| | | | | | | | | | | | | | | -title disappeared between Qt4 and Qt5, due to all the refactorings around QPA. Making the caption of the mainwindow configurable allows custom setups for specific users or use cases. [ChangeLog][QtGui][QGuiApplication] Restore support for -title command line argument on X11, add -qwindowtitle on all platforms. Change-Id: I73e6bf21248f3419178eba583b257172a175e74e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* If DblClick, do not deliver 'duplicated' MouseButtonPressRick Stockton2014-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | QWidgetWIndow: In Qt4, when Qt created a MouseButtonDblClick event, Qt would consume the causing MouseButtonPress. It would send only the derived dblclick event to widget windows and their children. This change makes Qt5.3 and higher emulate Qt4 delivery of double click-related events to widget windows and their children. QML objects (e.g. mousearea) continue to receive the second MouseButtonPress. [ChangeLog][QtGui][QWidget] MouseButtonDblClick: Do not send the 2nd MouseButtonPress event to Widgets. Restore Qt4 behavior in sequence of mouse events delivered to widget windows and their children. Task-number: QTBUG-25831 Change-Id: Iff0f9c592bceacb2ca844d30f8180081e136a889 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * Make qtbase compile with QT_NO_GESTURESTasuku Suzuki2014-01-101-0/+3
| | | | | | | | | | Change-Id: I90f173265e177ff37ce80da3983080651856259d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | qguiapplication_p.h: Compile fix for Android.Friedemann Kleint2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In file included from qguiapplication_p.h:1:0, from src/qandroidplatformdialoghelpers.cpp:46: src/gui/kernel/qguiapplication_p.h: In static member function 'static Qt::Alignment QGuiApplicationPrivate::visualAlignment(Qt::LayoutDirection, Qt::Alignment)': src/gui/kernel/qguiapplication_p.h:171:45: error: ambiguous overload for 'operator==' (operand types are 'QFlags<Qt::AlignmentFlag>' and 'int') if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) { Initial-patch-by: BogDan Vatra <bogdan@kde.org> Change-Id: I560b5c4c1db59da6f2a5e1e05c32a31f8e1dac22 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-241-0/+1
|\| | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * Implement native gestures on OS X.Morten Johan Sørvig2013-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QWindowSystemInterface::GestureEvent and QNativeGestureEvent to QtGui. These events are copies of Qt4's QNativeGestureEvent, where it was an implementation detail of QGestureManager. Add gesture message handlers to QNSView and bring back the Mac gesture recognizers for QGestureManager. Task-number: QTBUG-28126 Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-111-0/+1
|\| | | | | | | Change-Id: Ib8cfeee7d9ca15e8ad520e428b72c200827a8628