summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
Commit message (Collapse)AuthorAgeFilesLines
* QMacStyle: Make helper-NSViews layer-backedTor Arne Vestbø2018-08-281-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the view from triggering display of its superview when being temporarily added, which is both inefficient and causes issues when those dirty-rects are wrong due to the wrong frame position of the added view. The additional drawRect: calls and corresponding expose events resulting from the needsDisplay calls also caused repaint issues in Qt Widgets. QWidgetBackingStore doesn't seem to take the exposed region into account for an expose event, and will try to flush all dirty regions. Some of those may be outside the exposed region, and will be clipped away by the window system, never ending up on the screen, but with Widgets still thinking it has flushed all dirty regions. This is a separate issue, possibly solvable by setting the wantsDefaultClipping property on NSView to NO, but this needs further testing, so applying this commit as workaround makes sense, even if it's just hiding the real bug. Task-number: QTBUG-67998 Task-number: QTBUG-68023 Task-number: QTBUG-69990 Task-number: QTBUG-69740 Task-number: QTBUG-69292 Task-number: QTBUG-69332 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 38979332d0a66666ebd178bccd7e7a2b300a7e42) Change-Id: I4ef3fef29f749daa4f3a11fe9186ae77b359f966 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Configure checkbox NSButton as tri-stateGabriel de Dietrich2018-07-171-0/+2
| | | | | | | | | Qt allows this as a property of QCheckBox, so it should be enabled in its Cocoa counterpart. Change-Id: I88eb6dddabb173050c4fe7229f15c768181ef527 Task-number: QTBUG-69453 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGWFriedemann Kleint2018-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | Silence warnings about copying/clearing memory types which g++ considers non-trivial, for example: windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess] memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength); qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); ^ qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); by introducing a cast. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Access private properties via sandbox-safe API on Apple OSesTor Arne Vestbø2018-06-141-23/+8
| | | | | | | | | | We detect whether or not we're running inside a sandbox and bail out if so. We use runtime lookup of the property, so that static analysis of the application will not mistakenly think we're using the API in sandboxed situations. Change-Id: I5f5c42f5a4a44b62de061d945b62ac63167ece09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QMacStyle: Fix clipped arrow in QToolButtonGabriel de Dietrich2018-06-041-4/+8
| | | | | | | | | | | A quick and reasonable fix is to make sure the arrow fits in SC_ToolButtonMenu returns. In the future, we should keep the arrow's actual size and offset the icon accordingly. Change-Id: I218fa7726efbe4576a72889c41685de87ac14ac1 Task-number: QTBUG-68517 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Fix QComboBox left contents marginGabriel de Dietrich2018-06-041-3/+3
| | | | | | | Change-Id: I89a5e0c271bdaced8440e123c63c5435fa725856 Task-number: QTBUG-68518 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: remove unused qlibrary.h includeJ-P Nurmi2018-05-151-1/+0
| | | | | | | | Fixes build with -no-feature-library, because the qlibrary.h header contains QT_REQUIRE_CONFIG(library). Change-Id: If64ece8bd77e8824b86dc91f95dd9062cb2a1644 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Convert features.toolbar to QT_[REQUIRE_]CONFIGStephan Binner2018-05-023-2/+8
| | | | | | | | Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QMacStyle: Fix SC_ComboBoxEditField rectGabriel de Dietrich2018-04-181-2/+1
| | | | | Change-Id: I851e4bb1e0177ef5c594328c717e58ec7c9494e3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Fix appearance of selected inactive tab bar buttonGabriel de Dietrich2018-04-181-9/+50
| | | | | | | | | | Because we use toggle NSButton for selected tabs, the inactive appearance doesn't follow what NSSegmentedControl would have shown. Therefore, we fall back to our good old habits, i.e., render on a pixmap and do some pixel transformations. Change-Id: I838a2f23abee5846219ba67328c79fa8cc359a9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Clean up code, remove dead bitsGabriel de Dietrich2018-04-182-170/+72
| | | | | | | | | | | | Change QMacStylePrivate::drawNSViewInRect() signature to remove all the unused parameters. Reuse recent tab direction functions where appropriate. Includes the infamous outter -> outer fix. Change-Id: I8f92d79d8a6c3b5903bfbb13293afb6f72a5340b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle doesn't depend on Carbon anymoreGabriel de Dietrich2018-04-123-211/+1
| | | | | | | | We also remove the old documentation file that is now mostly outdated. Change-Id: I32c9c6b0984be5e41653a92b0b9287a89f73ee38 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: CE_TabBarTabShape is now HITheme-freeGabriel de Dietrich2018-04-122-103/+163
| | | | | | | | | | | This should be the last bit of QMacStyle depending on HIToolBox APIs. Small and mini sizes support coming later. Same for the focus ring. Change-Id: If625fccb87ebd0607b96a8c5040888df5a2a1032 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: SE_TreeViewDisclosureItem is now HITheme-freeGabriel de Dietrich2018-04-121-18/+3
| | | | | Change-Id: I34f1325adc661edde7bba7d7374bc8cfb80900ae Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: PE_FrameTabWidget in now HITheme-freeGabriel de Dietrich2018-04-122-74/+57
| | | | | Change-Id: If14e67bdae41099bb87fe2d7c4f65926d325766b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Remove cached focus ring drawingGabriel de Dietrich2018-04-121-79/+23
| | | | | | | | | We go for direct drawing for now. Some of the logic was a bit sketchy, and we need to measure how useful is caching and eventually compatible with the focus frame animation. Change-Id: Id30a68f77a4129197536e8ca251906ee8a730925 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: CC_ComboBox is now HITheme-freeGabriel de Dietrich2018-04-122-468/+241
| | | | | | | | | | | | | | | | For the time being, no more stretched QComboBox. They were already looking bad before and nobody complained, so it's a non-issue. In the future, we might use square combo boxes in the same way as we do for push buttons but for non-editable QComboBox only. Removes what is now dead code, including some leftovers. tst_QMacStyle updated to reflect size changes to accom- modate the focus ring. Change-Id: I60fac86b9acb52cc96373bca0b3cad598ec4f1e7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Fix "on" toggle button text colorGabriel de Dietrich2018-04-051-1/+2
| | | | | Change-Id: I344c63debdcf012a16305f1b2124e8ad0785d982 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Fix spinbox implicit heightGabriel de Dietrich2018-03-271-1/+1
| | | | | | | We don't need to accommodate for the fake frame anymore. Change-Id: I2d84441d4239e1ff68f640dffda1a0d1a97fa2b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Fix text color for disabled default buttonsGabriel de Dietrich2018-03-271-4/+5
| | | | | Change-Id: I7c6ba0c3818a3e269e0350153cbde355bafd249a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Remove CT_ToolButton related dead codeGabriel de Dietrich2018-03-271-29/+0
| | | | | | | | | sizeFromContents() just adds 10 points to the tool button size and returns. Therefore, the HITheme code that used to be shared with CT_PushButton becomes effectively dead. Change-Id: Ib0519b0037ec3097a00e2c14067d851040853499 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: SE_PushButtonContents is HITheme-freeGabriel de Dietrich2018-03-272-131/+42
| | | | | | | | This also removes a few HITheme-related functions that are no longer needed. Change-Id: I356938d1e99f5fed106c945a94050fa35db58716 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Do manual button sizing for CT_PushButtonGabriel de Dietrich2018-03-271-40/+37
| | | | | | | | | We guarantee the same sizes as previously with HITheme for most common cases. Exotic cases may break and will be fixed along the way. Change-Id: I3e3e6ea702c7489c1cbaa821a30916f63c440c1f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Don't highlight square buttons text when pressedGabriel de Dietrich2018-03-221-4/+6
| | | | | | | | | | Native square buttons keep their text black when pressed or on. Plus using the QStyleOptionButton variable over the QStyleOption one where appropriate. Change-Id: Idba8197e64d408e8a0987f1ef9243fde08e3e839 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Refactor button sizingGabriel de Dietrich2018-03-222-44/+47
| | | | | | | | | | We prepare for a better world without HITheme. Sadly, we can't guarantee Cocoa will be good enough as a replacement. So, expect more hardcoded values and margins. Change-Id: I915906b5dbfbfbfc8c7f5c3224fc0ed98562bb9f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Make CE_PushButtonBevel square if large enoughGabriel de Dietrich2018-03-222-37/+94
| | | | | | | | | | | | Meaning, if larger than the size of a regular NSButton. No intermediate size square buttons anymore. We'll try to get the closest one later, once the sizing problem is solved. We also refactor the button creation code a bit. Change-Id: I965520469546aea596cd1abec2309b40d70399ce Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: No more HITheme for CC_ToolButtonGabriel de Dietrich2018-03-222-73/+38
| | | | | | | | As for CE_PushButtonBevel, sizing is still pending. These two seem to go together anyway. Change-Id: I631c3f32ba201b16adbfa264a2920bfb636fb86f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: No more HITheme for CE_PushButtonBevelGabriel de Dietrich2018-03-222-112/+156
| | | | | | | | For rendering only. Sizing is still pending and, consequently, square buttons since these depend on the button's intrinsic size. Change-Id: Iacadc02a1a75970b221543b32ca724c92e118ce1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Make CocoaControl a full typeGabriel de Dietrich2018-03-222-50/+80
| | | | | | | And one small code clean-up. Change-Id: I57c71ce2e18c95529ee45ba4fdfc68e21209e384 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* offscreen: Check that native interface is valid before using itAndy Shaw2018-03-211-1/+2
| | | | | | | | | If the offscreen platform plugin is used on Windows then it can end up crashing since there is no native interface. This prevents a crash from occurring when these functions are called. Change-Id: I526fc0703771fa5f85b26d182ad3b15ef1a3ada5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Reapply 0d9208cecbbd9ed08e4ffb6540729668e3bd7754 on 5.11v5.11.0-alpha1Liang Qi2018-02-141-5/+3
| | | | | | | | | | | | This change amends 305dd1b61f657474d751cc3b24f58249ec21b61b, which lost 0d9208ce and brought src/plugins/styles/mac/qmacstyle_mac.mm back. In 4f3249f32dbe5c20aabbfd9b4f9c558aaf449e48, it was moved to src/plugins/styles/mac in 5.10. Task-number: QTBUG-65773 Change-Id: I721268caf12067ed798f5846234cd2fdf3e493dc Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge "Merge remote-tracking branch 'origin/dev' into 5.11" into ↵Jani Heikkinen2018-02-104-67/+97
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-104-67/+97
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| | * Fix HiDPI rendering issues in the WindowsVista styleAndre de la Rocha2018-02-022-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing miscellaneous rendering issues to make the WindowsVista style look good on High DPI displays: - Fixed size/resolution of combo box arrows, and changed to native look. - Fixed vanishing horizontal line in the frame of line edit widgets. - Fixed gaps in combo box popup. - Fixed size/resolution of arrow in push button menu. Task-number: QTBUG-49374 Task-number: QTBUG-65237 Task-number: QTBUG-65238 Change-Id: If68c2fae7472def3c19636483af741ca8ed2c490 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| | * QMacStyle: CE_Splitter is HITheme-freeGabriel de Dietrich2018-01-242-7/+31
| | | | | | | | | | | | | | | | | | Change-Id: I96a5ba5d685d1b8f95fd11489e4e95096d0fa9a4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QMacStyle: declare block in drawNSViewInRect() as noescapeGabriel de Dietrich2018-01-242-2/+2
| | | | | | | | | | | | | | | Change-Id: Ida67a963ab62c6b974eceeaf9d386b941f357798 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * QMacStyle: PE_FrameLineEdit is HITheme-freeGabriel de Dietrich2018-01-242-30/+20
| | | | | | | | | | | | | | | | | | | | | | | | CT_LineEdit is as well, so that makes QLineEdit free of HITheme APIs. Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QMacStyle: Fix crash when using Freetype font engineGabriel de Dietrich2018-02-091-24/+26
|/ / | | | | | | | | | | | | | | | | This amends cf7a4016a17615df2952389bae11149a49b151bc. Change-Id: I8bb3e934d10b2f522539b73ceaa80a9a4608ef12 Task-number: QTBUG-66248 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | QMacStyle: Remove call to HIThemeDrawSeparatorGabriel de Dietrich2018-02-051-12/+6
| | | | | | | | | | | | | | | | It looked inverted for some reason. A single line looks better than before. Change-Id: Icb214b44ddcc6e9e57fe12e7b4c3f512a5f66452 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QMacStyle: CE_DockWidgetTitle is now HITheme-freeGabriel de Dietrich2018-02-051-67/+30
| | | | | | | | | | Change-Id: Id2e23d37e9b87f89fc40e0d774c628eec91a986e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QMacStyle: QMdiSubWindow is now HITheme-freeGabriel de Dietrich2018-02-052-228/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple issues. Because the actual class for the buttons returned by +[NSWindow standardWindowButton: forStyleMask:] is private, we can't fully configure them as we could with HITheme. Therefore, we don't get the mouse hovered state and the zoom button will show the fullscreen arrow instead of the '+' icon. Hopefully, QMdiArea will go the way of the dodo soon enough. It is not a thing on macOS and it has been replaced by tabbed windows UI on most desktop apps. Change-Id: Ia581f72611ad0224f42657afbc4d9f94bf5e5a3a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Introducing SH_SpinBox_ButtonsInsideFrameGabriel de Dietrich2018-02-051-35/+12
| | | | | | | | | | | | | | | | | | | | This is currently only used in QMacStyle since, on macOS, the spin-box buttons are always beside the line-edit. Hence, there is no need to tamper with the line-edit frame. Change-Id: I8ccfbab547fccae89a8ddeaeb7005cb17d5951e6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QMacStyle: CC_SpinBox is now HITheme-freeGabriel de Dietrich2018-02-051-31/+29
|/ | | | | | | | | | | | | | | | | | | | Bonus changes in this edition: * The focus frame shows only around the spin-box's line-edit, as it should. This requires getting access to the spin-box's line-edit, which we do by setting a property on the former. Notice that the stepper doesn't get focus. On this point, macOS is inconsistent (partly because there's no such thing as an NSSpinBox, and partly because spin-box buttons are a separate control), so we copy the same focus behavior as NSDatePicker. * We clean some QFocusFrame related dead code in QMacStyle::event(). Change-Id: I204ca2093d9db343c78f0420811dda35c463bbcd Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Set WA_MacShowFocusRect for checkbox, radio buttonGabriel de Dietrich2018-01-172-31/+90
| | | | | | | | | | | | | | | | | | This fixes small and mini checkbox and radio button focus rings since the previous HITheme removal patch (90c9370d5098db95). But also allows to properly draw the focus ring outside the widget's boundaries, as it's common in macOS. More importantly, we pave the way to use QFocusFrame for most widgets and, eventually, implement the focus ring animation. Finally, we tweak the spacing between the indicators and their respective label. Change-Id: I4bf7ac1a06ce924a043f0365e487777d0b20a104 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: checkbox, radio button are now HITheme-freeGabriel de Dietrich2018-01-161-44/+32
| | | | | | | | | | | | | This also fixes focus ring thickness on retina displays except for radio button, for which we don't allocate enough space around. Instead of going down the push button madness we currently have, we leave it as is (i.e., slightly truncated) until we can come up with a more sane solution regarding focus rings. Change-Id: Icd4aa2e08c2558768c91efd7d119879e249b052f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Use QPainter to draw focus ringGabriel de Dietrich2018-01-161-34/+21
| | | | | | | Using Core Graphics or AppKit has no real advantage. Change-Id: Ie7e2df23f8da6ca4798092a7c074bbb2f40e2b18 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Draw CE_MenuItem text using AppKitGabriel de Dietrich2018-01-111-0/+30
| | | | | | | | | | | | | | We seem to induce QCoreTextFontEngine to draw text the wrong way in non-native QMenu popups. Here, we just delegate menu items' text rendering to AppKit. This is only a workaround pending a proper fix or better understanding of the aforementioned issue. Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55 Task-number: QTBUG-65653 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QWindowsXPStyle: Speed up level window loop in helper winId()Friedemann Kleint2018-01-091-5/+4
| | | | | | | | | | | Rewrite the loop using QGuiApplication::allWindows() to avoid the creation of temporary containers by QApplication::topLevelWidgets() and expensive checks. Task-number: QTBUG-64072 Change-Id: I56ef29b12f7bcbe274f3e00a6007d75d33f22b10 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWindowsXPStyle: Remove unused codeFriedemann Kleint2018-01-052-41/+0
| | | | | | | | Fixes a deprecation warning about QDesktopWidget::screenGeometry(). Change-Id: Ib56b2d3f62ddca60d84b4f626571b5e444304804 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add an option to scroll the QComboBox on macOS with the mouse wheelAndy Shaw2018-01-051-0/+3
| | | | | | | | | | | | | | | | | | Since there may be some applications that want to make their comboboxes scrollable or not with the mouse wheel then a style hint is added to make this toggable. It defaults to true for all platforms except macOS to keep it in line with existing behavior. [ChangeLog][QtWidgets][QStyle] Added SH_ComboBox_AllowWheelScrolling as a style hint to enable/disable the use of the mouse wheel in a QComboBox. This defaults to true in all styles except the macOS one so there is no change in existing behavior. Task-number: QTBUG-53094 Change-Id: I6eb61e1990bfc79e3b3ea82d7b91ee39096fa077 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>