summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Remove references to obsolete platformsJake Petroules2017-11-051-3/+0
| | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-2422-96/+98
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-239-56/+44
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | * xcb: Convert synthetic mouse enter event position to native pixelsBłażej Szczygieł2017-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mouse position is converted from native pixels later, so we must provide native pixels for "QWindowSystemInterface::handleEnterEvent". Amends 7091be1b7999d93fe2126042161dcd1d8fd20026 Task-number: QTBUG-63865 Change-Id: I813c171f2fc1d321af702ac30eb5f2e4232e97c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Windows QPA: Fix build with -no-feature-tableteventFriedemann Kleint2017-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Guard #include by QT_CONFIG. Task-number: QTBUG-63874 Change-Id: I33f4a4c4fbdae3d25874ee9cdc3f1c7e1ab783e3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Windows/Direct2D QPA: Fix build with -no-accessibilityFriedemann Kleint2017-10-202-2/+6
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63876 Change-Id: Ib9216977dd495e05d032e679c2f23ffe6a6953a6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * QCocoaSystemTrayIcon: Remove unused classesGabriel de Dietrich2017-10-201-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both QNSMenu and QSystemTrayIconQMenu aren't referenced anywhere else, including within qcocoasystemtrayicon.mm, since the QPA backend was added. Change-Id: I632c1b230226b2d08afce7f0f0019e9f7c030ba5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * iOS: add support for adding mimetypes other than text on the clipboardRichard Moe Gustavsen2017-10-191-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QVariant can only be converted to a QByteArray if it has user type QMetaType::QByteArray or QMetaType::QString. The way it stood, we always tried to convert the mime data to a QByteArray, and then put the result into a QVariant. This would fail if the mime data contained e.g a QPixmap. This patch will inspect what kind of data the QMimeData contains, and convert it to a QVariant using the expected API. Backport of 6d3c483 Task-number: QTBUG-57428 Task-number: QTBUG-63660 Change-Id: I09b4a94aef7b52773e1a79c468ead71b36dfbfc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Cocoa QPA: Remove usage of OBJECTIVE_SOURCESGabriel de Dietrich2017-10-191-6/+5
| | | | | | | | | | | | | | | Change-Id: I5924ab0ddb442624f5aeeef023428be228348707 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * QTableGenerator: Fix handling of illegal characters in fromBase8 againRobert Loehning2017-10-191-1/+1
| | | | | | | | | | | | | | | Change-Id: Iaee19f71e5b74b0d43b628739039ca3c2be60cd0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Android Accessibility: protect from accessing invalid interfacesFrederik Gladhorn2017-10-171-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am not sure if this is going to help, but it is required that the bridge checks that the interfaces it accesses are valid, since that protects from accessing them when they are in the destructor. This should be done, whether it fixes the issue or not. Task-number: QTBUG-45855 Change-Id: I2b96999ca4043f8b33607c864d1d178695d03192 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Windows QPA: Fix reporting of TabletLeaveProximity eventsFriedemann Kleint2017-10-171-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the check for totalPacks below; it prevents leave notifications from being handled. Task-number: QTBUG-53628 Change-Id: I2436c51308803337e6d48ef958e03123283d4a1d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Fix implementation of spell check underline stylesDmitry Shachnev2017-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextCharFormat documentation said that the used style is based on QStyle::SH_SpellCheckUnderlineStyle style hint, however in fact the implementation (drawTextItemDecoration in qpainter.cpp) uses themeHint(QPlatformTheme::SpellCheckUnderlineStyle) instead since Qt 5 (see commit 1f9ae50457a3750f). Make the documentation match that behavior, and update QPlatformTheme to use the correct default value. Also, switch Cocoa theme to use DotLine, as that is what native macOS applications use. Change-Id: I2a6bb3da6c7b0686dca87ed2c251b6abc006123c Task-number: QTBUG-50499 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 APIOrgad Shaneh2017-10-195-8/+11
| | | | | | | | | | | | | | | Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Windows: Fix inability to have two topmost windowsMårten Nordheim2017-10-171-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63621 Change-Id: I4ee6885d19907bff553149bef9efcffb209eb1f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-175-6/+30
| |\ \ | | | | | | | | | | | | refs/staging/5.10
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-165-6/+30
| | |\| | | | | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | | * Attach Qt main c++ thread to jvm at the early beginningVyacheslav Koscheev2017-10-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need it 1. to be sure, that thread is already attached to jvm when we attach debugger to the process 2. to have a human-friendly name for main native thread Change-Id: I1e572a0f09ec8af24a910835aaa6d302f6f2cb43 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * QCocoaWindow: Toggle titlebar transparency to support unified toolbarGabriel de Dietrich2017-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is need from macOS 10.13 onwards. See NSWindow related notes on https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/ Change-Id: I4b4653d7342de985d22b128d73940e7163bdb1e8 Task-number: QTBUG-63444 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | * Merge remote-tracking branch 'origin/5.9.2' into 5.9Liang Qi2017-10-061-1/+1
| | | |\ | | | | | | | | | | | | | | | Change-Id: Iaae1d9efe6b9267e8e8349905811525ff344e00c
| | | | * Cups: Check the created QPrintDevice is valid before using itAndy Shaw2017-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63293 Change-Id: Ibde0e8db955f6f3647b31cef8561d0744754cec1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * | XCB platform: Fix crash on X servers with BGR888 displayEirik Aavitsland2017-10-061-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the native visual was BGR888, the XCB plugin would assert as soon as it needed to find the corresponding QImage format. Fix by adding the required mapping in qt_xcb_imageFormatForVisual(). Task-number: QTBUG-62840 Change-Id: Idd9eb01a60f605ad004d5b0c3025ded63ed64271 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * | Windows: Let topmost and bottom windows use raise and lower respectivelyMårten Nordheim2017-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 329a029c361bcbaf70f3aa919693f0bef48a152f made ::raise and ::lower do nothing for topmost and bottommost windows. This made it impossible to e.g. raise one topmost window above another topmost window using QWindow::raise. Task-number: QTBUG-62021 Change-Id: I5f60816cbc48d69c0411e3bd68852d8bd8e300bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | | macOS: Defer update request on drawRect: when a real expose event is neededTor Arne Vestbø2017-10-173-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantics of QWindow::requestUpdate() is that it's used when the window needs updates outside of the normal window invalidation callbacks such as expose and resize events, e.g. when doing animations. As a result, user code might not be prepared to handle window invalidations in the update-request callback, assuming those will still be delivered as normal, so that's what we do. This was exposed by resizing one of the simpler Qt Quick examples, where the resize's expose event was delivered as an update request, but didn't trigger an unconditional draw of the window as it should, as the scenegraph didn't change in response to the resize, which is typical for an update request. Change-Id: Ida8f85f1cf61c332aa9b199520e6854c48d3ab40 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | QWindowsXPStyle: Add debug operators for the theme dataFriedemann Kleint2017-10-192-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to debug style issues. Change-Id: If2c236d6666512bf1658d951f9b304ce4d129357 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | | Windows QPA: Clean up code checking for the OS versionFriedemann Kleint2017-10-185-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QOperatingSystemVersion for comparisons and remove code for versions < Windows 7. Change-Id: I5a5e3d08a29accd42f170da3ee9c9021ca499f82 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | | linuxfb/drm: Pick up the format from the config fileLaszlo Agocs2017-10-171-10/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like eglfs, linuxfb (when QT_QPA_FB_DRM=1) can be configured to use a buffer and fb of a format other than the default XRGB8888. Most notably, adding "mode": "rgb565" to the first output in the config file pointed to by QT_QPA_KMS_CONFIG will switch over to using 16 bpp dumb buffers and a QImage::Format_RGB16 wrapping QImage. Note that linuxfb/drm has no multiple output support atm, so only the first output is taken into account. The BGR variants (e.g. xbgr8888) are available but cause no difference when it comes to Qt's painting (still maps to RGB32 etc.). This may need to be revisited later. Has no effect on the regular (fbdev) path in linuxfb. Task-number: QTBUG-63272 Change-Id: Ie7d0b05e3449b336104332d9568dab60b4bedaa8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-1737-591/+806
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | | | macOS: Mark the widget's container as embedded when placed into NSMenuItemv5.10.0-beta2Tor Arne Vestbø2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we'll end up creating a NSPanel for the QMacNativeWidget which is never closed, even if the backing NSView is moved to a new superview. Ideally this would be based on [NSView viewDidMoveToSuperview] and [NSView viewDidMoveToWindow], with retain/releases of the corresponding NSWindow, but that needs more research, especially as AppKit on macOS 10.13 will always keep a strong reference to the NSWindow. Task-number: QTBUG-63443 Change-Id: I9eec5ea871373d00dedf154600bf7005898cf37a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | | macOS: Add support for non-window backed offscreen surfacesTor Arne Vestbø2017-10-163-2/+27
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The modern approach to offscreen rendering on macOS is via FBOs, which means there's no reason to allocate an NSView and corresponding NSWindow just for that. In the offscreen case the NSOpenGLContext has a nil-view. Change-Id: I2d1d407069af4d5283e6f56fba83db8eaf694ac6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Windows Vista Style: Draw dock widget title with Qt::TextShowMnemonicFriedemann Kleint2017-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Align with the other styles. Task-number: QTBUG-54485 Change-Id: Ic8d008c59f5acf858b8ba6fbea5dd30b8aa9634c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | | Avoid using deprecated APIs on iOS 10.0+Lars Schmertmann2017-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic9dc6a24ef793a29c2652ad37bc11120e2e6ceef Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | | macOS: Split QCocoaScreen out from qcocoaintegration.mmTor Arne Vestbø2017-10-056-276/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's confusing to keep it along with an unrelated class. Let's keep it in its own file like for most other platform plugins. Change-Id: I449ee061ff9fd5dc7ef06cadd633414d6b16358f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | | QMacStyle: smooth QMenu corners for realOleg Yadrov2017-10-052-52/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been for years that QMenu's rounded corners in qmacstyle_mac were done via QWidget::setMask(QRegion). Unfortunately, QRegion mask does not work well with retina displays and also does not support translucency. That's why in this change we explicitly make QMenu's background transparent and then draw a rectangle with rounded corners in QMacStyle::drawPrimitive(PE_PanelMenu). This not only gives much better result than the mask-based approach, but also de-HIThemes QMenu. As a consequence, QComboBoxPrivateContainer doesn't get any mask from QMacStyle anymore. Therefore, when the mask is empty, we need to paint PE_PanelMenu before invoking QFrame's paint event handler. Made-with: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Change-Id: Ia9236176113f23b86e45507fa6ddf77236084ce3 Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-0511-20/+85
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/5.10
| | * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-0411-20/+85
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | | * | OCI: Clear the cache in the result for a forward only queryAndy Shaw2017-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the query is forward-only then nextIndex() is always 0, therefore the cache values need to be cleared beforehand so that they are not reused when the next row is retrieved. Task-number: QTBUG-57765 Change-Id: I49e8427b24ec2d932e5b387699ac7f3496e9a48c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * | QWindowsMouseHandler: Add documentation link for bitmask magicGabriel de Dietrich2017-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I743aef0e15ef42347c5222d0e50577b006483cc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * | macOS: Bail out early when handling shortcut event results in closing windowAnders Hafreager2017-09-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Cmd+W is used to close a window, check if m_platformWindow is still valid before accessing window property. Task-number: QTBUG-63389 Change-Id: I9abda19b8482e7a1fd07b07d8981b6a768e96c2e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * | Windows QPA: Call raise() also for SubWindows with WindowStaysOnTopHintFriedemann Kleint2017-09-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMdiSubWindows may have WindowStaysOnTopHint set. Task-number: QTBUG-63121 Change-Id: I21f80311fdf57e775df895122299bb7beb6ec4e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * | Windows QPA: Detect screen by mouse position when dragging a windowFriedemann Kleint2017-09-264-11/+39
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dragging a window by its border, detect the screen by mouse position to prevent it from oscillating between screens when it resizes. Task-number: QTBUG-62971 Change-Id: I0a4a584ef8ff3bb7288d1abec4de51fb4091dccd Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | * Windows QPA: Move function to find screen by HWND to QWindowsScreenManagerFriedemann Kleint2017-09-253-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62971 Change-Id: Ida0a8e758723f0f617011a89dc89c266d2506aad Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | * Only call mysql_library_end() once when using MariaDBDaniel Vrátil2017-09-211-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB allows only a single call to mysql_library_end(), all subsequent calls to mysql_library_init() or any other API call will fail. Since QMYSQLDriver calls mysql_library_end() function whenever the refcount drops to 0, this breaks applications that close and reopen database connections. This change registers call to mysql_library_init() via qAddPostRoutine() when compiled against MariaDB, so that we only call it once. Task-number: QTBUG-63108 Change-Id: I22c1f0c5b081216f12596a32748dca25cae919e9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * XCB: also test for Xinerama's presenceThiago Macieira2017-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's included unconditionally from qxcbconnection.cpp and qxcbscreen.h. Task-number: QTBUG-53537 Change-Id: I6e1fe42ae4b742a7b811fffd14e5d374155660f3 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | | Let QPlatformBackingStore handle its own QOpenGLContextTor Arne Vestbø2017-10-054-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resources allocated by QPlatformBackingStore are owned by the class, and should be allocated in a context the class also owns. This removes the asymmetry of having to pass in a context to composeAndFlush, while having to make the same context current before destroying the platform backingstore. The context owned by QPlatformBackingStore is shared with the associated window though a new QWindowPrivate::shareContext() API. The result is that on e.g. iOS, the backingstore does not need to tie the resource allocation of QPlatformBackingStore to the global share context, but can instead tie them to the per-window context, and hence clean them up after each window is closed. Task-number: QTBUG-56653 Change-Id: Ic1bcae50dafeeafaa8d16a7febd83b840ec6367a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | macOS: Prevent backingstore image detach during color space assignmentv5.10.0-beta1Tor Arne Vestbø2017-10-042-27/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to CGImageCreateCopyWithColorSpace took a naked toCGImage(), which left the resulting CGImageRef without a release, causing the extra ref by toCGImage() to never be derefed, and a subsequent detach of the image data on the next paint event. Wrapping the call in a QCFType<CGImageRef> solves the problem. The code has also been moved directly into QCocoaBackingStore::flush(), as there is no need to keep the CGImageRef a member. A local autorelease pool has been added to QCocoaBackingStore::flush(), so that the NSImage used for blitting the backingstore is released upon exit of the function, thereby releasing the corresponding CGImageRef. Note that for layered mode, the QImage will still detach, as the view's layer.contents property keeps a reference to the image data until being replaced in a subsequent flush. Task-number: QTBUG-63559 Change-Id: I06b9298f65a84deae7cc2eff617ba75c92ec3b87 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | QMacStyle: Remove HITheme calls for QSizeGripGabriel de Dietrich2017-10-031-45/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's no longer a thing on macOS. We still keep it around for QMdiSubWindow, but we should support 4-edge resizing there as do native windows. In practice, because of WA_MacOpaqueSizeGrip, we were already rendering the size grip manually instead of relying on HITheme. Change-Id: If613a14f03dc650b457688f3f2f57631b5fb30a3 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | QMacStyle: De-HITheme QGroupBoxGabriel de Dietrich2017-10-032-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | NSBox is good enough for this and pixel equivalent with the previous HITheme calls. Change-Id: I32b2a1cc8a9cd2a6ef17d1e01032540344808ebc Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | QMacStyle: Refactor QMacStylePrivate::cocoaControl()Gabriel de Dietrich2017-10-032-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That switch following the if looked a bit corny. Also made cocoaCells hash mutable to get rid of the const_cast(this) in QMSP::cocoaCell(). Change-Id: I4facec827409314cf1214152c19efb9688715eb2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | macOS: Tighten up window icon and represented filename handlingTor Arne Vestbø2017-10-033-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Window icons on macOS are tied to document windows, and should not show up unless a represented filename has also been set according to the HIG. We follow this, and no longer create a document button based on the window title if one did no exists. We also fall back to using the filename of the file if a title has not been set, including being able to restore this default title after setting a custom title. The icon is no longer reset to nil after setting a QIcon(), which would remove the icon completely, but instead we restore the default behavior of showing the default filetype icon of the file. Finally, the two callbacks in QNSWindowDelegate dealing with the document icon/title popups and drags have been taught to look for spaces in the represented filename. This allows clients who really want the old behavior of setting an icon without caring about the filename to set the filename to a single space character, which will prevent the dropdowna and drag from occurring. The reason for not tying this behavior to the existence of the file in the filesystem is that being able to represent a file that is yet to be saved is a valid usecase. Task-number: QTBUG-63338 Change-Id: I7d4377c6358226fb6058f8c2b3c28588eec77ce5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>