summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication_p.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * QPA: Fix event dispatcher dependent operations in platform integrationLaszlo Agocs2013-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration implementations that perform tasks in their constructor that rely on the event dispatcher. For example creating a QSocketNotifier is not possible anymore since the event dispatcher is created later on. This is fixed by introducing an additional virtual in QPlatformIntegration that gets called after createEventDispatcher(). Two broken platform plugins have been identified so far: eglfs is creating socket notifiers to read events from input devices and xcb's input context plugins may use dbus. Both are updated accordingly. Task-number: QTBUG-33768 Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-10-091-2/+1
|\| | | | | | | refs/staging/dev
| * QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Relay mouse event synthesization informationLaszlo Agocs2013-10-041-1/+3
|/ | | | | | | | | | | | | | | | | Make platform plugins, like the windows one, able to indicate if a mouse event is synthesized from a touch event by the OS. This will be valuable information for the Quick2 event handlers. No new member variables are added to QMouseEvent. Instead, the enum value is encoded in the caps member, there are plenty of bits available in it. This introduces Qt::MouseEventSource and QMouseEvent::source() as public APIs. Change-Id: If087a0bafb33a6cd7891bd07b84871358f6aba69 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add QPA session managerSamuel Gaist2013-09-041-4/+2
| | | | | | | | | | | | | | | | | | The QSessionManager doesn't allow customization in platform independent way. The new QPlatformSessionManager aims to change that. Now the QSessionManagerPrivate has a new QPlatformSessionManager member to forward all the calls to QSessionManager's functions. If no platform manager is present, the current behavior is used. QPlatformSessionManager mimics the current QSessionManager behavior. A new factory function has been added to QPlatformIntegration to return a QPlatformSessionManager Task-number: QTBUG-28228 Change-Id: Ida7ac16a8f5303df5014fcb67878170ebdb37203 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Added applicationState() to QGuiApplication.Yoann Lopes2013-09-021-2/+2
| | | | | | | | | | | We only had the QApplicationStateChangeEvent to know about the application state. Added a function and a signal to offer a more convenient way to query the current state. Change-Id: I926aac0b3b53bd285df5825aff5b4c37ae863d03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Reintroduce -geometry command line argument for X11/XCB.Friedemann Kleint2013-07-251-0/+2
| | | | | | | | | | | Add parsing for the window geometry specification to QGuiApplicationPrivate. Enable the argument under a different name for the other platforms as well. Task-number: QTBUG-27349 Change-Id: I973b2c69f5172f7d0bc983b8ba4b0d164649ef02 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.Stephen Kelly2013-06-191-0/+2
| | | | | | | | Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com> Task-number: QTBUG-31569 Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Make QWindow update its screen when moved to a different oneGabriel de Dietrich2013-05-231-0/+1
| | | | | | | | Also implements the Cocoa backend for that. Change-Id: I32977e12a04e1cf48b12333442482746c69ce133 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix the check if mouse events should be synthesized from touch eventsFabian Bumberger2013-04-111-0/+2
| | | | | | | | | | | | | | | | In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents is taken into account when synthesizing mouse from touch events, in QApplication only the PlatformIntegration syle hint QPlatformIntegration::SynthesizeMouseFromTouchEvents. With this patch both attributes are checked. Furthermore the check was moved out of translateTouchToMouse in QApplication in order not to influence the result which is returned to the user, when mouse events are not be synthesized. Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QThread: fix race when setting the eventDispatcherDavid Faure2013-03-221-1/+1
| | | | | | | Use QAtomicPointer to make this thread-safe. Change-Id: If71f204699fcefabdb59bd26342d777d1cc9e2a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPA: Add interface for setting the application state explicitlyRichard Moe Gustavsen2013-02-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this patch is twofold: 1: we need a way (for iOS/Android) to tell the current window to remove focus from the focus object when the user hides the input panel. Otherwise, if the focus object is e.g a line edit, the cursor will continue to blink inside it, which is wrong. As it stands, telling the active window to deactivate (by calling QWindowSystemInterface::handleWindowActivated(0)), will cause the whole application to deactivate if no windows are active, which is not what we want. 2: Qt currently understands just two application states, Activated and Deactivated. On mobile platforms we can have other states as well, like "suspended" on iOS. So controlling the application state should not depend on window activation, but instead be controlled through a separate API by the platform plugin. This patch will add the following function: QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState) that lets us control the application state from the plugin. This also means that we factor out application state handling from window activation, which also gives us a way to remove focus from a window while keeping the application active. To not break existing desktop platforms that relies on application activation being tied to window activation, we need to make this API opt-in by using a platform integration capability hint. This is not optimal, but found necessary after investigating several other solutions. Which states (other that active/inactive) it makes sense to add to Qt::ApplicationState will be a topic for later patches. Change-Id: Ic6fdd3b66867abb67da43eba04ec86f06d82ff94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.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>
* Move session management code from QApplication to QGuiApplication.David Faure2012-11-281-0/+10
| | | | | | | | | | | | | | QSessionManager was already in QtGui, but not usable since the only API to get to it was still in QtWidgets. Session management isn't related to widgets, it also applies to QML apps on the desktop. The virtual commitData and saveState methods have been removed, given the two signals which exist since 4.2, and an additional isSessionSaving() method was added instead. Change-Id: I8099e70df133303e74456706827da21f013fcc6a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Bring back -nograb/-dograb for debugging.Friedemann Kleint2012-11-151-0/+1
| | | | | | | Task-number: QTBUG-27632 Change-Id: I4b59df01519af4684d9dbe6e4b6c18a5ebd9aeae Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Added private header warnings in src/gui/kernelSamuel Rødal2012-11-091-0/+11
| | | | | Change-Id: If3ad9d1e18543639f9e6abb8899b72772bc70c83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-301-0/+1
| | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add ContextMenu event to QWindowSystemInterfaceMiikka Heikkinen2012-10-251-0/+3
| | | | | | | | | | | | | Context menu key wasn't working, as QPA had no handling for it. Added ContextMenu event to QWindowSystemInterface and proper handling to QGuiApplication and QWidgetWindow. Also provide Windows implementation. Task-number: QTBUG-27648 Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introducing the PlatformPanel event type.Sergio Martins2012-10-031-0/+2
| | | | | | | | | | | | | | | | | This event can be used by any platform plugin to implement special application panels/overlayed menus. Currently used by QNX only. This replaces sending fake Qt::Key_Menu presses in the QNX plugin. Qt::Key_Menu is already used when invoking context menus with the keyboard. Change-Id: I9c8f1743fd147a07c11883323800017376915ae1 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@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>
* Private slots should be named starting with _q_Sergio Ahumada2012-09-031-1/+1
| | | | | | | | | | | | | This is to reduce the risk of collisions with signals/slots in user classes q_updateFocusObject(QObject *object) => _q_updateFocusObject(QObject *object) q_checkFocusObject(QObject *object) => _q_checkFocusObject(QObject *object) q_connectFocusObject() => _q_connectFocusObject() emitActivated(QPlatformSystemTrayIcon::ActivationReason) => _q_emitActivated(QPlatformSystemTrayIcon::ActivationReason) Change-Id: I148913f1e24a80fe5cacfd737d1b455b805cfced Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-031-2/+2
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-191-2/+2
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Clear qt_button_down widget when starting a drag.Friedemann Kleint2012-07-111-0/+8
| | | | | | | | | Prevent pickMouseReceiver() from using the widget from which the drag was started. Task-number: QTBUG-26145 Change-Id: I65d4c295a894193e41c676fb9fd1f7113c2631b5 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Make QWindowSystemInterface part of QPA APIGirish Ramakrishnan2012-07-031-2/+2
| | | | | | | | | | | | | | | As discussed on mailing list and QtCS 2012. Any file starting with qwindowsystem is now marked as QPA API. This change drops _qpa from the filenames and adds gui-private where required for the code to compile. This change is backward compatible otherwise and compat headers are created for the old inclusion headers. Change-Id: I72ea0f394dee74f46e614fcf11ab5500ac9fef2a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add QGuiApplication::setApplicationDisplayName.David Faure2012-06-271-0/+1
| | | | | | | This is for use in window titles. Change-Id: I0070a08abd379ae2edcfab4413c182bd9e840678 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Prevent ending up in a state where focus is perpetually grabbed.Samuel Rødal2012-06-181-0/+1
| | | | | | | | | | | | | | | Mouse / enter / leave / key events etc are all blocked when a window has the blockedByModalWindow flag set. The problem appears if a QWindow is created and only later directly or indirectly parented to a modal window that's currently showing. Since the decision on whether a window should be blocked or not is based on its parent / transient parent chain, we need to reevaluate the blocked status each time the parent or transient parent of a window changes. Task-number: QTBUG-26112 Change-Id: Ida6b118b556fe26d17fa86335a0fe7baddc7eaf8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix crash in qt_qpa_core_dispatcher() at application exit.Miikka Heikkinen2012-06-081-1/+6
| | | | | | | | | | | | | | | | | | In some situations it is possible to get events when QCoreApplication has already cleared the 'self' pointer and will thus not return an instance. For example, destroying screen at application exit when there are parentless dialogs open will result in hiding the dialog, which at least in Windows causes a call to QWindowSystemInterface::handleExposeEvent() which will need the core dispatcher down the line. Fixed the crash by checking if the QCoreApplication instance is valid instead of blindly using it. This should cause no problem as unhandled events are simply queued. Task-number: QTBUG-26061 Change-Id: Ide2350a62208433728e0271192c1da4b1efacc9b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Added QScreen::setOrientationUpdateMask().Samuel Rødal2012-06-061-0/+1
| | | | | | | | | | | | It might be too expensive to always have an accelerometer sensor running, so introduce API so that the application has to explictly ask to get the orientation updates it's interested in. Change-Id: Ib7dc5ad8807718409f744ebef53f4476aa05175d Reviewed-by: Ian Monroe <ian.monroe@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-3/+3
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPA tablet event supportLaszlo Agocs2012-05-311-0/+6
| | | | | | | | | | Should be sufficient to allow implementing the actual functionality in xcb/cocoa/windows to match the Qt 4 level of tablet event support. Task-number: QTBUG-25864 Change-Id: Iebcca256dfba841d8976b58fda1b76026d3133a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix QtGui compilation for -qconfig largeTasuku Suzuki2012-05-231-0/+2
| | | | | Change-Id: I118a9b40c9eef821b326ee9dabbb9765d65277b7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add mouse event internal members needed by declarativeLaszlo Agocs2012-05-221-0/+5
| | | | | | | | | | | | In order to remove QQuickMouseEventEx we have to be able to store touch-related data, like capabilities and velocity, also in mouse events. However they should not be exposed through the public API in any way. (at least not in 5.0) Change-Id: I7774b9ea00074950208559463249fbdcaeeaefbf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QIcon: move back to QtGuiOlivier Goffart2012-05-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the files and tests git mv src/widgets/kernel/qicon* qrc/gui/image/ git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/ - update the include of QIcon git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon" git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon" - Adapt QIcon \ingroup documentation sed -i s/QtWidgets/QtGui/ src/gui/images/qicon* - Adapt export macro sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon* - Update .pri and .pro files - Remove the use of QStyle::alignedRect by copying its content (and adapt slightly - Use QGuiApplication::palette() instead of QApplication::palette() - Add a hook in QGuiApplicationPrivate to call the QStyle::generatedIconPixmap() from QtWidgets Another commit follows to adjust QMetaType::Icon and move the QVariant and QMetaType icon handler back in QtGui Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>