summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Readability fix for MS isRelative, isAbsolute.Edward Welbourne2016-02-091-6/+10
| | | | | | | | | | | The layout and phrasing of these two QFileSystemEntry methods was such as to obscure what they actually test. (Overlong lines, extraneous parentheses, spurious conditions and poor line-breaking.) Rewrote to make both clearer; and, in particular, to make it obvious that they are *not* mutually complementary. Behavior is not changed. Change-Id: If748e48d41fe3a76bab3a1f840c7b7ca62442f8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QWindow::setMask(): Apply High DPI scaling.Friedemann Kleint2016-02-092-4/+3
| | | | | | | | | | Move code from QWidget::setMask() and reimplement QWidget::setMask() using QWindow::setMask(). Task-number: QTBUG-50938 Change-Id: I040688d6b18df91368fa6ab6392a3b4cd80f2683 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Don't force antialiasing when it is turned offEskil Abrahamsen Blomfeldt2016-02-091-2/+4
| | | | | | | | | | | | | | | | | In the gray antialiasing code path for text on Windows, we check whether Cleartype is enabled in the system and, if it is, we forcibly enable gray antialiasing instead. But in this logic we did not consider the case where antialiasing is turned off entirely, i.e. when the style strategy is QFont::NoAntialias. We should never override no-antialias with antialias. [ChangeLog][Windows][Text] Made it possible to disable antialiasing for text when drawing into images. Task-number: QTBUG-47141 Change-Id: Ieb2beba8c2d02295abe6d9a98d2e63a2d39c9e6a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* dbustray: Support late registering of tray icon menuDmitry Shachnev2016-02-093-8/+14
| | | | | | | | | If a menu is added to the tray icon after the icon itself has been registered, we need to register the menu properly. Change-Id: I19a6d78848142d66c2cd882746d8d55c0b9a2818 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* dbustray: Do not change m_menu in QDBusTrayIcon::createMenu()Dmitry Shachnev2016-02-091-5/+1
| | | | | | | | | This method can be called for a submenu after it's called for the top-level menu, and we should not replace it with a submenu. Change-Id: I8e180ee074287cfcdc76dfe77c6c7aa7d5891741 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix clang 3.7 developer build [Werror, Winconsistent-missing-override]Sérgio Martins2016-02-081-1/+1
| | | | | | Change-Id: Ia5c149c6e6886c38bb9a83cd8b36737a57876b41 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* dbusmenu: Refactor the code to allow dynamic updating of menusDmitry Shachnev2016-02-086-54/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Transfer propertiesUpdated and updated signals from submenus to parent menus. Without this, the adaptor only receives this signal from top-level menu items, and doesn't receive it from items of submenus. Connect to these signals when a menu item is added or synced, and disconnect when it is removed. * Make QDBusPlatformMenus use IDs of items containing them, not their own IDs (own IDs do not make any sense since they are not exported over D-Bus). * Store toplevel menus per-adaptor, to make it possible to export multiple menus (for example a menubar and a tray icon menu). * Adjust the QDBusMenuLayoutItem::populate methods to always get the menu via its containing item and to populate the menus recursively. * Map D-Bus menu AboutToShow method to platform menu aboutToShow method, and map hovered and closed events to hovered and aboutToHide signals. (QTBUG-46293) * Always set the visible property on item. Otherwise, when an item becomes visible, the D-Bus menu still thinks it's invisible because that property was not changed back to true. (QTBUG-48647) * Call emitUpdated from insertMenuItem and removeMenuItem methods, as they really update layout. Do not call it from syncMenuItem, it changes only properties but not the layout. * Start revision numbering with 1, because libdbusmenu-based hosts ignore updated signal with revision=1. Task-number: QTBUG-46293 Task-number: QTBUG-48647 Change-Id: Icf713405db0443e25462c1a19046df7689fe5e78 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
* Reduce allocations by using reserve()Sérgio Martins2016-02-0714-20/+44
| | | | | Change-Id: If34fa53402985f6b3c5e7217bce4a1177af835b6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make QWindowGeometrySpecification suitable to use as globalSérgio Martins2016-02-071-3/+5
| | | | | | | | | It's used as a global static but according to library policy it's required to have a trivial dtor and a trivial or constexpr ctor, otherwise it runs code at library load/unload. Change-Id: I1fcea3ce388b2a198e3851e6d0aeb91ae0a8e4b1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* xcb: Fix not delivering focusIn event on hide/showAlexander Bersenev2016-02-061-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a window which was hidden and shown with hide() and show() methods and mouse pointer was in window when hide() was called. At first, window got focusOutEvent and then Qt library sends X server a message to unmap the window. Then X server will send client two messages: 1) FocusOut(10) detail=Nonlinear(0x03) 2) FocusIn(9) detail=Pointer(0x05) QXcbWindow has a logic for not seting active window to 0 if there is a FocusIn coming (see QXcbWindow::doFocusOut). So QGuiApplicationPrivate::focus_window still points to the current window. Then when show() is called, qt compares previous focus with new focus and, since they are equal, doesn't do anything. Event focusInEvent isn't delivered to the window. Here are two links why X server sends FocusIn just after FocusOut: http://lists.freedesktop.org/archives/xorg/2008-December/041684.html https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html Proposed fix ignores FocusIn events with detail==Pointer. The text of explaining comment is taken from the Chromium project: https://chromium.googlesource.com/chromium/src/+/master/ui/views/widget/desktop_aura/x11_desktop_handler.cc from X11DesktopHandler::ProcessXEvent function. [ChangeLog][module][Linux/XCB] Fix not delivering focusIn event on hide/show with XCB Task-number: QTBUG-49071 Change-Id: I433c8b638834c25f113cc134ee4185778c44f540 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Correct enter/leave event handling when mouse button is pressedBłażej Szczygieł2016-02-061-3/+10
| | | | | | | | | | This patch fixes cursor shape when mouse leaves the window and enters the window again with pressed mouse button - ignore the mouse enter and leave event when any of mouse buttons is pressed. Task-number: QTBUG-46576 Change-Id: Id6ce50cd0d66da51a251d4811bc42cd31606de29 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: XInput2 fixes, enter/leave event fixesBłażej Szczygieł2016-02-067-95/+183
| | | | | | | | | | | | | Added enter/leave event handling in XInput2 to avoid problems with those events when the mouse is grabbed. This commit amends: 53d289ec4c0f512a3475da4bbf1f940cd6838ace This commit amends: ed2e15780385f7cf0a0d3aedc9cb2059d470bd58 Task-number: QTBUG-50340 Change-Id: I7a120b46daa4f8fa4c218346273ae90b6abfa156 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Link with -ldl option only when it is supportedLada Trimasova2016-02-052-2/+2
| | | | | | | | | | | | | | | | -ldl option was used unconditionally while libdl is not supported when libc is static. Add build test to configure which checks if libdl is supported. QMAKE_LIBS_DYNLOAD in "src/corelib/plugin/plugin.pri" is now used only if libdl is available. qt_linux_find_symbol_sys from qlibrary_unix is now used only if QT_NO_DYNAMIC_LIBRARY is not defined. Initially reported by Buildroot autobuilder here: http://autobuild.buildroot.net/results/a85/a85a1839a45fb6102e53131ecc8f6dadf92bcdc2 Change-Id: I0397472456efdc4f3ab5f24d01253bee8048a9d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QtWidgets: Fix build & warnings with QT_NO_GRAPHICSVIEW.Friedemann Kleint2016-02-052-8/+13
| | | | | | | | | | | | | | | | | kernel\qapplication.cpp(3157,18) : warning: unused variable 'isGraphicsWidget' [-Wunused-variable] bool isGraphicsWidget = false; ^ kernel\qwidget.cpp(6446,18) : warning: unused variable 'window' [-Wunused-variable] if (QWidget *window = w->window()) { ^ kernel\qwidget.cpp(7949,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) ~~~~~ ^ kernel\qwidget.cpp(8084,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) Change-Id: I8474ab0ab4617c6588707ce0c2f7a97e4d0e54da Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: correct minor typoGabriel Pannwitz2016-02-051-2/+2
| | | | | Change-Id: If19900309bbef8b65d3dbda4f7795113bfe0678f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* If the font is not being found then get the English name regardlessAndy Shaw2016-02-051-0/+2
| | | | | | | | | | | | In a case of having a non English system locale, then the face and name of the font may be localized but will not match up what is in the registry. Therefore we need to try with the English name if is possible that there is one, so in the case of when registerAlias is false we should try to get the English name if necessary. Change-Id: Id1064b6f5263677320374dbddfad852f30f041c5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Doc: corrected minor link issuesNico Vertriest2016-02-052-1/+2
| | | | | | Task-number: QTBUG-43810 Change-Id: I98eafe0c7ed55f309640e8495c83ffcef355aa08 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Windows QPA: Remove dead code as detected by Clang.Friedemann Kleint2016-02-0512-97/+6
| | | | | | | | Task-number: QTBUG-50804 Change-Id: Id87ca4ac98eb17b1e743a10080554da38d609588 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8aAndy Shaw2016-02-051-1/+1
| | | | | | | | | | | This fixes the crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8a. The drag only needs to be ended on the hide if it is actually in the middle of dragging. This enables the case of dragging the dock widget out with the mouse to continue to work. Task-number: QTBUG-50890 Change-Id: I72309dd40ee670319f2ff607ae201c46f8de4652 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Windows QPA: Add missing override declarations.Friedemann Kleint2016-02-053-8/+8
| | | | | | Task-number: QTBUG-50804 Change-Id: I27017b0d0fd44cf746d180fdb126d1e6593e7d7b Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Accessibility OS X: Improve password handlingFrederik Gladhorn2016-02-041-10/+17
| | | | | | | | | Set the right sub role (NSAccessibilitySecureTextFieldSubrole) and return the bullet point character for the text contents. This alignes the behavior with native widgets. Change-Id: I7305e08dca61097dd8c050aed64c792c06de0a4d Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Windows QPA/Accessibility: Fix Clang warnings about comparing different enums.Friedemann Kleint2016-02-041-6/+6
| | | | | | | | | accessible\iaccessible2.cpp(1708,40) : warning: comparison of two values with different enumeration types ('IA2Role' and 'QAccessible::Role') [-Wenum-compare] Q_STATIC_ASSERT(IA2_ROLE_COLOR_CHOOSER == QAccessible::ColorChooser); Task-number: QTBUG-50804 Change-Id: I25a1f00fdbd687ff23f875542a6aa0cc0cab3d23 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Make findAmPm actually return the relevant enum, instead of int.Edward Welbourne2016-02-042-13/+11
| | | | | | | | The enum needed a name to make that possible, of course. The one overt int return -1 needed to be made explicitly Neither, too. Change-Id: I3930bf03a7ee5e1619a1c74f9ca54faf6a6c5b2f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Removed redundant and distracting test from conditional.Edward Welbourne2016-02-041-1/+1
| | | | | | | | | | If argumentTypes is NULL then it is indeed not equal to the address of a local static variable, so there is no need to follow the NULL-check with a check that it's not equal to that non-NULL address. Change-Id: I62362db747c0620b2195f7997368f026f535d57c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Direct2D: Spell out ~QWindowsDirect2DPaintDevice.Friedemann Kleint2016-02-042-0/+6
| | | | | | | | | Fixes warning about deleting the incomplete type QWindowsDirect2DPaintDevicePrivate. Task-number: QTBUG-50860 Change-Id: I11edb49e6e3996963913155e307fd5f3944bffd2 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* End the drag if the dockwidget is being hiddenAndy Shaw2016-02-041-0/+2
| | | | | | | | | | | | When the window flags are changed for the widget then it is possible to minimize the dockwidget via the titlebar. This will cause it to be ready to start a drag internally but since the dockwidget never gets a mouse release event it doesn't end it. Therefore it ends up being in an invalid state later on when restored, so the endDrag() needs to happen in the hide event to ensure this is not an issue later on. Change-Id: Ia84bee96b9eed49896869e6a15d4de6d01964264 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QWizard/Windows: Add missing override.Friedemann Kleint2016-02-041-1/+1
| | | | | | Task-number: QTBUG-50804 Change-Id: Ia1c73b40d96ddea01e440e0e3e010ff3fcb88793 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* egldevice: Add a way to force mode settingLaszlo Agocs2016-02-041-2/+7
| | | | | | | | | | | | | | | | | | Normally setting the mode again and again on each application startup is not desirable as it takes time and considerably affects the application startup experience. However, in some cases (like shutting down the X server) the output gets powered down and there seems to be no way to detect this. Here setting the mode again becomes necessary. Until there is a better solution, add an environment variable QT_QPA_EGLFS_ALWAYS_SET_MODE which, upon a non-zero value, leads to always calling drmModeSetCrtc. The issue is not specific to Qt, the same is visible with the NV examples as they try to minimize redundant mode set calls in the same manner. Change-Id: If2b5e3fda74e077a747dd03cee65c936560a5026 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* dbusmenu: Fix return type for QDBusMenuAdaptor::EventGroup methodDmitry Shachnev2016-02-032-2/+3
| | | | | Change-Id: If7454eeaafb31737f023e7359b2a1c513dd5772f Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* dbusmenu: Add missing methods for getting QDBusPlatformMenu propertiesDmitry Shachnev2016-02-031-0/+3
| | | | | | | | Similar to the existing methods for QDBusPlatformMenuItem. These methods will be needed for implementing the D-Bus platform menu bar. Change-Id: Iae3a5892b71fa9a7c72c323ee4b3ab2afd7d4d76 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Take into account the orientation of touch pointsAlexander Volkov2016-02-033-5/+40
| | | | | | | | | | | Add support for ABS_MT_ORIENTATION value. Linux kernel multi-touch protocol allows it to be in a wide range: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt, but we need only to know whether the touch point rect is rotated by 90 degress. So adjust the angle to the closest axis. Change-Id: Ie20725dc4bef509e2f9b19571efc69502d00c019 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Don't include <qtest.h> from qtestblacklist.cppTor Arne Vestbø2016-02-021-1/+0
| | | | | | | | | | | | It's only supposed to be included by clients of the library, and confuses qmake's dependency resolution into thinking the header-only features such as qtestkeyboard.h and qtestmouse.h are dependencies of this source file. Change-Id: I5fe73b752c1c491ee0088bced77f997696d96c62 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix rounding error in fetchTransformedBilinearAllan Sandfeld Jensen2016-02-021-2/+4
| | | | | | | | | | | | | To calculate the real count we need to use the actual fixed point increment and can not use the floating point value increment wass based on since it might round differently. Includes auto-test by Gabriel de Dietrich. Task-number: QTBUG-50153 Change-Id: Ia973088f361c90370fa20bac14a4b8f373b5d234 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Disintermediate QDateTimeParser::SectionNode operations.Edward Welbourne2016-02-023-60/+46
| | | | | | | | | | | | | | | The name, format and maxChange of a Section depend only on the section, not on the details of the currently parsed text it matches; so we don't need the parser object's list of all sections to work them out. Move these methods to the SectionNode and act directly on that instead of going via the section list. Make the name take a Section enum instead of an int. Likewise, make stateName take a State enum instead of an int. Change-Id: Ie340d042ab95aec517013c4dcc30901d40305c78 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Make interleaving of QDateTimeParser::Section values evident.Edward Welbourne2016-02-021-11/+12
| | | | | | | | | | The actual section members grew up to the internal value, leading to interleaving of subsequently-added values. Change existing enum values to make this go away (class is private, so no BC constraint forbids this). Change-Id: If266b557817eae19d375519bf38268f0f2a0d372 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Deconfuse some heavy use of the preprocessor.Edward Welbourne2016-02-021-6/+6
| | | | | | | | | | | | | | | One #if...#endif started in one function's body and ended in another's, which is worth remarking on in comments at both ends. A later #if...#else... opened blocks in both halves, that were closed just after their #endif, leading to simplistic brace-matching failure; so move that closing brace to inside both halves, so each half is brace-balanced and the function, as a whole, brace-balances simply. Commented on each #endif that was distant from its #if. Change-Id: I74d97b6dc4b291ec05053d299077a61cecf41ca1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Correct usage of Apple-related #if-ery.Edward Welbourne2016-02-021-4/+4
| | | | | | | | As requested by sanity-bot. Change-Id: I8f6793a26f5cf600d4e6225ca219496cfbb25799 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* dbusmenu: Add support for shortcutsDmitry Shachnev2016-02-024-12/+60
| | | | | | | | | | To do that, split out and export a QKeySequencePrivate::keyName() function that returns the key text representation without the modifiers. The implementation is compatible with libdbusmenu-qt. Change-Id: Ibc3190a3949813a1610728cf89574027e5d2778d Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Remove warning about being unable to instantiate accessibility interfaceFrederik Gladhorn2016-02-021-8/+1
| | | | | | | | | | | | This warning was a good idea when the plugins were needed to give a hint where to start debugging. Now the a11y plugins were merged into qtwidgets/qtquick, so there is no more need for this warning which may pop up on custom widgets e.g. inheriting QWindow. Task-number: QTBUG-50215 Change-Id: Ic5efbb3dfbd07a7139884126a2604b54c99005e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* QDockWidget: Restore using setGeometry since the geometry is used for the stateAndy Shaw2016-02-021-6/+2
| | | | | | | | | | This solves an instance where restoreState() was used when the dockwidget was already floating and the saved state was also for a floating dockwidget. Change-Id: I1fe764ae2a6b0351ae26e33ffec682ad37c944d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Stop Q_AUTOTEST_EXPORTing QKeyBinding and QKeySequencePrivateDmitry Shachnev2016-02-021-2/+2
| | | | | | | | | | The QKeySequence test no longer uses private members (since commit 725bdc3fd2f88c7f49f59a151579fd128cf543dc), so that is no longer needed. Also, remove the unused include from the test. Change-Id: I4d252bb3efd7282f74c44e48444c23ab51d48ea5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Revert "QWindow::destroy(): only reset QGuiApp::focus_window and friends as ↵Tor Arne Vestbø2016-02-023-46/+11
| | | | | | | | | | | | a last resort" This reverts commit 4c71db756741d35ccb32dc4c32aa1823264c85df. It's too risky for 5.6, we should let it cook in dev for a while and backport when ready. Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* xcb: Ignore Mouse Enter:ungrab, Leave:grab events.Gatis Paeglis2016-02-011-2/+3
| | | | | | | | | | | | | | | | | These are "special" XCB_NOTIFY_MODE_(UN)GRAB Enter/Leave events and we do not have handlers for them in Qt, so lets just ignore events with this mode. Patch fixes Qt+ArchLinux+Awesome WM issues, where Qt applications were receiving Enter/Leave events for mouse clicks in the application window. This patch does not affect "normal" XCB_NOTIFY_MODE_NORMAL Enter/Leave event handling. Task-number: QTBUG-45818 Change-Id: Ib70fdd9ed9200364a9753904f8e63d1ed9e2072f Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix memory leak if QMetaType::create is called for an unknown typeJędrzej Nowacki2016-02-011-2/+3
| | | | | | | | The memory should be allocated only if we operates on a valid type, It is a regression introduced by 3d575d4845926bd141ff0c14e57427bba79644d0 Change-Id: Ia31bccd5b41fe090c29df1aeaa69efb706cd25bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbusmenu: Make D-Bus menus and menu items enabled by defaultDmitry Shachnev2016-01-311-2/+2
| | | | | | | | | There is no reason why they should be disabled, and also the current behavior breaks the D-Bus platform menu bar implementation. Change-Id: I8a8b5b6a66e40f1f1a25394dc87ac2178c7907fa Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix flickering status tips in submenus.Michal Policht2016-01-301-1/+3
| | | | | | | | | | | | Changed setCurrentAction() function so that it reselects parent menu action only if mouse is over a menu and parent menu is not already selected. Task-number: QTBUG-47987 Change-Id: Id077d6ce1de1335ba2709180c8480af5d1720de0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Michal Policht <michpolicht@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix GCC 6 valid warnings about misleading indendationsThiago Macieira2016-01-306-40/+40
| | | | | | | | | | | It's currently producing a lot of false positives, but a few are actually valid. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69029, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69122 and some others. Change-Id: I24a735698d3c4a719fc9ffff1425f29d7b5a3458 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtDBus: Remove unnecessary #ifndef for QT_NO_PROPERTIESThiago Macieira2016-01-301-2/+0
| | | | | | | | qfeatures.txt says that it depends on PROPERTIES, so this condition will never happen. Change-Id: I42e7ef1a481840699a8dffff1409e2e63c6857fa Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last ↵Tor Arne Vestbø2016-01-293-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | resort Resetting focus_window and other internal QGuiApplication variables before calling setVisible(false) and destroying the platform window means that the platform window can't reason about whether or not it was the focus window unless it can resolve that using native APIs. We should let the platform window take care of resetting the focus window and related states, and only execute our fallback logic if the plugin doesn't do the right thing. We also use QPA to update the state instead of modifying the internal QGuiApplication variables directly, so that events and signals are emitted as a result of the reset. The QLineEdit test gets two added calls to processEvents(), since assuming that activateWindow() is synchronous is not correct, and would result in the QMenu resetting the focus window to 0 on destroy. Task-number: QTBUG-46414 Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Move Cocoa key code helper functions to QtCoreTor Arne Vestbø2016-01-294-140/+153
| | | | | | | | Can be useful for e.g. testlib for handling native key events. Change-Id: I6560c6e28799e25eb3bdcaa0f2ca3c17644c62db Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>