summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-082-4/+4
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: port away from QRegion::rects()Marc Mutz2017-12-081-2/+3
| | | | | | | | | | | | | Use being()/end() instead. The region of whose rects() we iterate here is modified in the loop body, so take a copy of the rectangles. Since QVector is still missing a range constructor, use std::vector. This does not cause extra copies, since the QVector inside QRegion would detach anyway, when the QRegion is modified inside the loop. Change-Id: Ib973e825b55d9c9568936cb80180858163d87379 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* xcb: port away from last QRegion::rects()Marc Mutz2017-12-061-5/+4
| | | | | | | | | | | Use begin()/end() instead. In QXcbShmImage::flushPixmap(), instead of gettings different rects(), depending on a bool parameter, just call yourself again with the modified QRegion, which we can then just iterate over. Change-Id: I6d4f7c6e4e5d2a24520716847ca9331bf39337c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* xcb: share code for QRegion -> xcb_rectangle_t[] conversionMarc Mutz2017-12-063-14/+13
| | | | | | | | | | ... between QXcbWindow and QxcbShmImage. Replaces one QRegion::rects() call (to be deprecated), fixes potential overflows that QXcbShmImage did not handle, but QXcbWindow did, and saves ~1KiB of text size. Change-Id: I55d37021164feefe0cb3e60bd6d22b1976a6467b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* xcb: use a more efficient unique_ptr instantiationMarc Mutz2017-12-061-6/+8
| | | | | | | | | | Wrap std::free() in a function object, to avoid having to carry around state (the function pointer) inside unique_ptr objects. This shrinks unique_ptrs back to sizeof(void*). Change-Id: I32a711192c5485dc04e3b36a1ddabf02d1e9d4f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: remove redundant QT_XCB_DEBUG_XINPUT* envvarsGatis Paeglis2017-12-061-6/+0
| | | | | | | | | | | | | In Qt 5.4 these envvars were replaced with categorized logging 59ba84d31cf17d86e615e2958fece6f6e0bbefe2. This is not a public API, the log output is useful mostly for developers and it can still be used via QT_LOGGING_RULES, so there is no good reason to keep the old envvars around. By using QT_LOGGING_RULES, we can access even more xinput2 logs than is available via QT_XCB_DEBUG_XINPUT*. Change-Id: I2b12b8696043bc8bf8310f49f0cdc2ba1b8708ba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-061-14/+14
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* styles: port away from QRegion::rects()Marc Mutz2017-12-061-3/+1
| | | | | | | | | | | Use begin()/end() instead. Drop the special handling of rectCount() == 1, since with begin()/end(), we no longer take the hit of creating a QVector just to be able to return it from rects(). Change-Id: I19ebc38267951c80bc71aa9d2b5df7403d710064 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* platform plugins: port away from QRegion::rects()Marc Mutz2017-12-064-14/+13
| | | | | | | Use begin()/end()/rectCount() instead. Change-Id: I5c642c4a2c64da65d3f37159396c86073818ca95 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* minimal QPA: Make font DB creation more flexibleGabriel de Dietrich2017-12-043-7/+30
| | | | | | | | | | | | Prioritize CoreText over Fontconfig since the former is the native one on macOS, and any other native font DB on its respective platform. We introduce a new 'fontconfig' option to allow using Fontconfig instead. This works similarly to 'freetype' overriding the default font engine on Windows. A propos of which, 'freetype' now does the same on macOS. Change-Id: Ic8168820d1d01fddc2f26e046abb65b8ab765f89 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Support ForwardKeyEvent signal in ibus input contextPeng Wu2017-12-042-0/+38
| | | | | | | | | | | For ibus-hangul, it needs ForwardKeyEvent signal to fix the commit issue. [ChangeLog][plugins][ibus] Support ForwardKeyEvent signal Change-Id: If41e75bed9ec4e3126db05c8ece4a51d2bc3c3fd Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove code that refers to PostgreSQL 7.2 or olderAndy Shaw2017-12-011-148/+54
| | | | | | | | | | We haven't had support for anything older than 7.3 for a long time, so this removes the code to save having to maintain it any further. Task-number: QTBUG-644 Change-Id: If0635f3bef5138a00a0e77011a70f23d0bffda32 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macx-clang: Opt-in xcb QPA support with XQuartzGabriel de Dietrich2017-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Enable xcb QPA plugin when XQuartz is available. This is done in a single build, alongside the Cocoa version. We delegate part of the configuration stage to pkg-config, so this becomes a requirement. Ensure that PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig is in your environment, or pkg-config is properly set up. Tested with the following configure options: configure \ -pkg-config \ -fontconfig -system-freetype \ -system-xcb -xkb -no-opengl \ -qt-xkbcommon -qt-xkbcommon-x11 Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-3011-40/+45
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-3011-40/+45
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| | * iOS: Don't set background color when debugging window managementTor Arne Vestbø2017-11-291-1/+0
| | | | | | | | | | | | | | | | | | | | | It will fill the view in some cases, obscuring what Qt draws. Change-Id: I9ca00dddd829a28fb2cb3b009bfd3223f85ef7cb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * iOS: Use environment variables for debug flags instead of QObject propertiesTor Arne Vestbø2017-11-284-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | The former is more idiomatic in Qt, and doesn't require as much boilerplate to set up. Change-Id: Idf03af4018611c8eb3b31af90da72f9d85617b2c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * [android] Fix compile with -warnings-are-errorsBogDan Vatra2017-11-241-1/+0
| | | | | | | | | | | | | | | | | | | | | Remove unused variable Change-Id: I64da66da0c17131de6280660576f2789696e86b3 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-236-13/+37
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | | * iOS: Take UIWindow bounds into account when making window fullscreenTor Arne Vestbø2017-11-221-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an app is in split-view mode, the app can't use the full bounds of the screen, but should limit its area to that of its UIWindow. Task-number: QTBUG-48225 Change-Id: Ia66ad6bba24d9d73a8263ad3f65b9dee9b8a1b37 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * iOS: Add logging of window geometry/exposureTor Arne Vestbø2017-11-213-0/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I6ffc7cd1dde4fadd3e952deabe9c3a1dbce7884d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * iOS: Make sure FBOs are cleaned up in the right QIOSContextTor Arne Vestbø2017-11-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 655687d84d6a591422 shuffled things around, moving the logic to connect to the window's destroyed signal from backingFramebufferObjectFor into makeCurrent. Unfortunately backingFramebufferObjectFor was the one taking care of recursing into the root context (when shared contexts were in play), so the end result was that the root context were keeping track of the FBO, but the leaf context was trying to clean up the FBO. Task-number: QTBUG-56653 Change-Id: I80ed71a3dedeb7611b2aa7548d94b9fbe0e20763 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * qpa: Teach handleApplicationStateChanged about sync/async deliveryTor Arne Vestbø2017-11-203-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using QWindowSystemInterface::SynchronousDelivery reduces the chance that we are flushing other events before delivering the application state change. Those other events may conclude that the application is still active, while in reality it is not, and do bad things. Change-Id: I738c162fac22d2cd18de1e080bcd2cda78ec3f77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | Cocoa: Update layer contentsScale on screen changeMorten Johan Sørvig2017-11-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failure to do so will result in displaying the layer contents on a quarter of the window when moving the window from a 2x screen to a 1x screen. Task-number: QTBUG-64494 Change-Id: I57ce98025e841549f62d132d4985e727898e6207 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | iOS: Remove forced Qt::AA_ShareOpenGLContextsTor Arne Vestbø2017-11-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8e70241dccaf removed the need for having a global sharecontext to be able to composit GL and raster content in the backingstore, but forgot to remove this part of the iOS platform. Change-Id: I46ffd766729369aff2f8c54799bd033905c9f3dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | macOS: Fix handling of multiple ampersands in menu itemsAndre de la Rocha2017-11-301-2/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the text of a QAction in a menu item contained a sequence of multiple ampersand characters, only one of them would be removed, which is inconsistent with the way this situation is handled on Windows, where every other ampersand is removed, which is also the way other widgets such as tabs, buttons, etc. are handled on macOS and other platforms. Task-number: QTBUG-63361 Change-Id: Ibd9a520afa37b3387f3b951a94a3c275742e7ad3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Thiago Macieira2017-11-3029-528/+599
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-2329-528/+599
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-171-1/+1
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects) on RHEL 6.6 in CI. Conflicts: tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Task-number: QTBUG-64569 Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
| | | * OCI: Match the constraints on the index_name columnAndy Shaw2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When looking for the primary index, it is possible that the constraint_name in the all_ind_columns table does not match that of the index_name. Whereas the index_name will match in this case, so the query should set the where clause on the index_name in both tables. Task-number: QTBUG-64427 Change-Id: I1bf1fb580e620b9f75f2fde1ecf408842e377365 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| | * | QMacStyle: De-HITheme item views headers and a couple arrowsGabriel de Dietrich2017-11-152-135/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one is all manual. The arrows were manual before and the header sections are now plain rectangles. Removes one usage of HIThemeDrawButton and related logic together with a cached pixmap and its rendering. Still broken in some places, but not worse than before. In particular, sunken or selected header sections will not render the left hand side section separator properly. Look can be improved in the header label with different shades for the selected or current rows/columns. Change-Id: I6b1c1f529909341bbf72e82e5a3fc61905c75fa8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | QMacStyle: Render tool button even when a11y is missingGabriel de Dietrich2017-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tool buttons were being skipped a couple cases (CE_ToolButtonLabel and CC_ToolButton) when accessibility was disabled. Although unlikely anyone would disable accessibility on macOS, we fall back to the non- toolbar rendering if that were to be the case. Change-Id: Ie8ee11475efbe4b418c34842317bafeba80c3c57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | QMacStyle: Make backingStoreNSView mutableGabriel de Dietrich2017-11-152-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even thought the resolve function is effectively not const, it's more straightforward to call. Change-Id: I7c881183862c3c0b326daf001b2f9e569153ee76 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | QMacStyle: Replace HITheme info structs with QMSP::CocoaControlGabriel de Dietrich2017-11-152-78/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not yet a full replacement, but a scaffolding stage until we can remove all traces of HITheme info structs. Change-Id: I10eb6a60662c6b102bc687e335d0d1bedd6a4a12 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | QMacStyle: Remove unused codeGabriel de Dietrich2017-11-153-74/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I6e71871b19ce12daddd4cfbbe7c1d9beede13a9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | QMacStyle: Rename Cocoa controls enum namesGabriel de Dietrich2017-11-152-88/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For easier sorting and grouping by actual Cocoa NSControl class. We also shorten the names and move the types inside QMacStylePrivate. Change-Id: Iac093fd359da66abd263aca841b870ea84337f50 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-0/+1
| | |\| | | | | | | | | | | | | Change-Id: I2f8f6b1d196548087219739faa3ad1517626da1e
| | | * Cocoa: Make High DPI drag cursor workMorten Johan Sørvig2017-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ide4bc50ab7173529a00fe60a04204bad0b3f275e Task-id: QTBUG-60769 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | Offscreen QPA: Use fusion style alwaysFriedemann Kleint2017-11-142-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent it from crashing when naively using it for example on Windows, which defaults to the Windows Vista style operating on native window handles. Change-Id: I7b1dfb00a6b6860d0f0a134653ce1142b45959ec Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-0911-110/+167
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | | * QCocoaMenuItem: Don't clear NSMenuItem.action when setting submenuGabriel de Dietrich2017-11-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contrarily to what the comment stated, we actually rely on automatic menu validation, even for submenu items. This is visible in the menu delegate's validateMenuItem: and itemFired: methods. This solves the last visible issue in BigMenuCreator where, under ASP/ASP, ASP/SAP, SAP/ASP and SAP/SAP, all A*S submenus would be disabled. The cause was an incorrect target/action setup. Menurama still behaves as expected. Change-Id: I2599d6fb0d51f56f5d36f03b69647e35ff6c550a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * Cocoa: optimize backingstore flush on 10-bit displaysMorten Johan Sørvig2017-11-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt draws the backing store to the window using CoreGrahics, which will trigger a slow RGB32 -> RGB64 conversion when the output display is a deep color display. Disable NSWindow dynamicDepthLimit and force the depthLimit to WindowDepthTwentyforBitRGB for the common case of 8-bit-per-component raster surfaces. This was benchmarked by resizing a simple QRasterWindow test case which fills the window area using QPainter::fillRect(). Before: 67.1% rgba64_image_mark_rgb32 10.8% __vImageCopyBuffer_block_invoke 6.0% madvise 5.0% _kernelrpc_mach_vm_deallocate_trap 4.1% qt_memfill32(unsigned int*, unsigned int, int) After: 30.7% __vImageCopyBuffer_block_invoke 20.3% madvise 12.3% __vOverwriteChannelsWithScalar_ARGB8888_block_invoke 12.2% qt_memfill32(unsigned int*, unsigned int, int) 4.6% _kernelrpc_mach_vm_deallocate_trap The test program now spends significantly more of its time allocating/deallocating the backing store (madvise), and running the Qt paint event (qt_memfill32). Task-number: QTBUG-47660 Change-Id: I878be7a0e6eee4ad798f7a53f7f9f79b7950af26 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Xinput: Avoid misdetecting certain trackballs as tabletsEirik Aavitsland2017-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The algorithm triggers on the word "cursor" in the device name, which would also happen for devices from the manufacturer Cursor Controls. Task-number: QTBUG-48034 Change-Id: I9645c0d0bc1fa951d0ea00480572fd0df0220eb5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * QCocoaMenu: Attach menu items when updating the menubarGabriel de Dietrich2017-11-054-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of waiting for the menu delegate to update each item, we can attach an NSMenu to its NSMenuItem as soon as we update the current window's menubar. This is safe to do because we know that this is going to be the main menubar right after, so we're not orphaning any NSMenuItem from its NSMenu at the wrong moment. By doing this, we also ensure that all menus from the active menubar are reachable by the key-equivalent dispatching logic, even before we display the actual menu. This was shown in BigMenuCreator where, under the menubar's ASP and SAP menus, all A*S submenus would be disabled. Furthermore, on the same menus, SAP would show the same issue. Added test in Menurama as well. Change-Id: If6e7311072e6b53ad1cbced73623d1832aa0df8e Task-number: QTBUG-57076 Task-number: QTBUG-63712 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * QPSQL: Fix check for minimum supported PostgreSQL versionRobert Szefner2017-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Qt documentation http://doc.qt.io/qt-5/sql-driver.html#qpsql minimum supported version of PostgreSQL is 7.3 Change-Id: I30cffaddc29fd56b534bfd259cc235ea1204a21f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * QPSQL: Fix handling binary data for PostgreSQL 9.x and laterRobert Szefner2017-11-041-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set byte_output to 'escape' mode for server version 9 and later, no matter what version of client library we use. Since setting byte_output doesn't depend on client version anymore, we can move it to separate function. This fixes qtbase\tests\auto\sql\kernel\qsqldatabase tst_QSqlDatabase::psql_escapeBytea() test (before this change test did not pass on PostgreSQL 9.6) Change-Id: I37aaa18267d7e6459c00010ed899536c01e8124e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * QPSQL: Fix detection of PostreSQL version 9.x and laterRobert Szefner2017-11-042-98/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed parsing version string for PostgreSQL. PostgreSQL versioning changed since version 10, see link: https://www.postgresql.org/support/versioning Extended QPSQLDriver::Protocol enum for PostreSQL 9.x and later, added underscore to item names to separate major and minor version. Changed long switch-case statements to if-else. Change-Id: Ib19ae7ba426f262e80c52670e7ecb3532ff460a0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * Windows QPA: Pass on Url of non-filesystem directory itemsFriedemann Kleint2017-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not attempt to copy directory items, which will fail and result in empty result lists. Amends 5865e582fd537fff530c13301e5229a7b4ed21c7. Task-number: QTBUG-57070 Task-number: QTBUG-63645 Change-Id: I59efce196b28099ec8aff5a802ef0a4d9a098453 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Windows QPA: Restrict file dialog to file system items in Directory modeFriedemann Kleint2017-11-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt cannot handle places like 'Network', etc. Task-number: QTBUG-63645 Change-Id: I53d0eedc2996af6a1ec3230e3d65a3e272aa3710 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | macOS: Fall back to QWindow::icon for application icon if not setTor Arne Vestbø2017-11-072-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three ways to set the application (Dock/task switcher) icon: 1. By setting an ICON in the project file 2. By calling QGuiApplication::setWindowIcon 3. By calling QWindow::setIcon The third one was not working on macOS, despite being documented as such: "The window icon might be used by the windowing system for example to decorate the window, and/or in the task switcher." We now update the application icon based on the active window, unless a global application icon has been set using ICON, or via QGuiApplication::setWindowIcon. The reason for not allowing the window's icon to override a global application icon is that the developer may have intended to set the document icon for a window (to represent QWindow::filePath), and we don't want that to affect the Dock icon of the application. The role of QGuiApplication::setWindowIcon is a bit dubious in this, as it's documented as "This property holds the default window icon", which would indicate it should follow the same logic as above by not letting it override the global ICON set in the project file, but this would not allow runtime switching of the application icon, so the QGuiApplication property is left as is. The property should probably have been named QGuiApplication::applicationIcon initially. Task-number: QTBUG-63340 Change-Id: I94d3710a8586bb729af42f59a915b8f49dded101 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>