summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix the tips still show when cursor move to another actionQiang Li2021-01-152-1/+57
| | | | | | | | | | | | In this case, the previous action's tip is still displayed when the cursor moves from one action with tip to another action without tip. Fixes: QTBUG-89082 Change-Id: I0a00595dc3d716725678487be9cbb363c4d3b392 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 3f3d5e6716d9130776b3613ccbd5595de7d4af8d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: exclude failing tests for tst_QPlainTextEdit on AndroidAssam Boudjelthia2021-01-121-0/+10
| | | | | | | | | | | | The Android tests were marked insignificant for some days, due to an emulator issue, these tests slipped during that time. Exclude them now to bring Android tests. Task-number: QTBUG-89402 Change-Id: I96d0f87b36975b7e2c83956b04b6569a03a781a9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit a0ee0118651d97381f892e24b789ac392a2d8be7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restore previous QDateTime behavior in DST gapAndreas Buhr2020-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Historic QDateTime behavior when being asked to create a QDateTime in the DST gap was to interpret the given date as if it was in the time before that gap, mapping it to a point in time after the gap. This has changed with a04411119ead3d4473e4f0ac4bceedc585977b2f . Since then, the given date is interpreted as if it was in the time after the gap, thus being mapped to a point in time before the gap. This patch restores the historic behavior. This was not caught by Coin because machines ran in timezone "Atlantic/Reykjavik" which does not have DST since 1967. This patch changes tests to always run in "Europe/Oslo". Driveby: Test function "findSpring" did some operations in local time, even though being asked to work in a specific time zone. Fixed that. Fixes: QTBUG-86960 Fixes: QTBUG-89208 Change-Id: Iecce5898bf9711a10e7dfc0a25e4bbeaed1c8ade Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 3d785249ba43cf4bd895ed679bac2791e0130dc5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_QMdiArea::updateScrollBars on macosIvan Solovev2020-12-171-0/+3
| | | | | | | | | Task-number: QTBUG-41343 Change-Id: I782ded140932ab3af52ee5ca9b743fd2a3cdb473 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f8de5e54022b8b7471131b7ad55c83b69b2684c0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_qlineedit for offscreen rendering and tiling window managersAndreas Buhr2020-12-091-3/+8
| | | | | | | | | | | | | | | | | | | tst_QLineEdit::QTBUG13520_textNotVisible checks that text is visible if a QLineEdit is set to Qt::AlignRight. To do that, it writes some text into a line edit and checks afterwards that the first character is in the left half of the window. This fails if the window is larger than twice the length of the text used and thus might fail in multiple situations where Qt is not in full control over the size of the windows created, as is the case with tiling window managers. This patch changes the test to not check for the first character in the left half of the window, but instead check for the first character be approximately at the expected position. Change-Id: I18f6de356ea20f4744f3a58cd2b1d76f6a9545a4 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit aeb5165cb639ab682bbb6c5f778d53c9746c01ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTest: don't wait before sending mouse event: increment the timestampShawn Rutledge2020-11-171-2/+4
| | | | | | | | | | Tests can run faster now, but we still expect calculations based on the timestamp (such as QEventPoint::velocity()) to be correct. Change-Id: Ie962604c9ebd139384dcd89a157de66b4b773cc9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: exclude tests crashing at startAssam Boudjelthia2020-11-163-2/+66
| | | | | | | | | | | These tests are failing with "java.lang.UnsatisfiedLinkError: dlopen failed: invalid ELF file" at the start, excluding them now to enable Android testing until they're fixed later. Task-number: QTBUG-87671 Task-number: QTBUG-87025 Change-Id: Ida7d7158fccdc31df1f9689f77fde832964d732f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stop copying events in testsVolker Hilsheimer2020-11-121-3/+3
| | | | | | | | It's unnecessary, and copying QEvents is a bad practice since it's a polymorphic class. Change-Id: Ieb6de106084f838c5e6c8a0643c54fd3c7f4a7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QLineEdit: check a int->QChar conversion, and make it explicitGiuseppe D'Angelo2020-11-061-4/+12
| | | | | | | | | | | | | QStyle::styleHint returns int, and that int was simply used to build a QChar representing the "password mask" character. Enforce that it actually fits and then do an explicit cast. (In general, of course, this is an API flaw; styleHint should somehow return a QString for this use case). Change-Id: Ifb6181b229b91cc84859cb9b9d57e21d6748c31a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-0418-3/+126
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-031-15/+12
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: I0e4a7508646037e6e2812611262eed8b6d7ad3de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QCombobox: propagate the palette to the embedded line editWang Chuan2020-11-021-0/+27
| | | | | | | | | | Let the new created embedded QLineEdit use the palette from QCombobox, when calling [setEditable(true)] Fixes: QTBUG-81533 Pick-to: 5.15 Change-Id: Ia406dd8122a348e185f0e94d027646b95eeaa76e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add QPushButton::touchTap autotestShawn Rutledge2020-10-291-0/+25
| | | | | Change-Id: Ibfed43fd4b8fdc3834ee7ca7bd92296504943abe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update tst_qspinsbox test to use metaType systemDavid Skoland2020-10-281-1/+1
| | | | | Change-Id: Ib744a1ceb3d90ae443ee754f97c0ef1edbbac52f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate old aliases for two countries and several languagesEdward Welbourne2020-10-282-8/+8
| | | | | | | | | | [ChangeLog][QtCore][QLocale] Deprecated several Language and Country aliases, ready for removal in Qt 6.0, in favor of their newer names. Task-number: QTBUG-84669 Pick-to: 5.15 5.15.2 Change-Id: Iebaa0a5a77bfa12f7014de53fab4a25b5f1cc92c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Show the year correctly after it has been editedAndy Shaw2020-10-261-0/+4
| | | | | | | | | | | | When converting the year as an integer via the locale then it can add in group separators which would not be desired here. Therefore it should be converted via the QDate approach to get the right output for the year. Fixes: QTBUG-86307 Fixes: QTBUG-85966 Pick-to: 5.15 Change-Id: I092bd1e5f69e544843fd5f28c96b94c9066490c5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-235-13/+13
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tests: blacklist tst_QMdiArea::tileSubWindows() on CentOSLiang Qi2020-10-221-0/+1
| | | | | | Task-number: QTBUG-87768 Change-Id: Iad86e3114e546c0cab92f0fccdc7a265575a687e Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QTabBar: update index of last visible tab in insertTabStanislav Yelenskiy2020-10-211-0/+26
| | | | | | | | | | | | | | Index of the last visible tab was not updated, if a new tab was inserted after the current tab and before the last tab. When the new tab is inserted before the last visible tab, the index of the last tab increments by one. When the new tab is inserted after the last visible tab, then the newly inserted tab becomes the last visible. Fixes: QTBUG-86898 Change-Id: I2f4b7f705261ec35a5aa7b883ecdddba25f007b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTabBar test: refactor: extract checkPositions helper functionStanislav Yelenskiy2020-10-211-22/+31
| | | | | | | | | | | Extract checkPositions helper function to re-use in the new test. Task-number: QTBUG-86898 Change-Id: I5c8241b5701cd8c8c3e21607c385217d4b75e728 Reviewed-by: Jordi Pujol Foyo <jordi@vikingsoftware.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Get rid of all usage of QApplication:desktopVolker Hilsheimer2020-10-142-10/+6
| | | | | | | | Use QScreen APIs instead. Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Avoid repeated date-time formatting in test data namingEdward Welbourne2020-10-091-14/+16
| | | | | | | | Also correct two comments which lied about the year being tested. Change-Id: I5be491a2b2c1e0c3b49d6ff9a8de852e17321cff Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-0714-28/+28
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Test end-date, not just its string representation, in QDTE testEdward Welbourne2020-10-061-170/+264
| | | | | | | | | | | | | In tst_QDateTimeEdit::dateEditCorrectSectionSize(), only the final displayed date was tested; many of the tests checked day of week (by name), which might well match despite actually selecting a different date than the one intended. So test the date is as expected, too. In the process, tidy up the code, give values more informative names, turn a trivial static function into a lambda. Change-Id: I0491159e9ee2f3cfdcf8a194c723be92c190c2a8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFlags: remove deprecated constructorEdward Welbourne2020-10-031-4/+4
| | | | | | | | Fix remaining places that still exercised it. Task-number: QTBUG-85700 Change-Id: I84562f53439197141343831c0b9f88983689e6bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Re-enable a QDateTimeEdit right-to-left test of its sectionText()Edward Welbourne2020-09-301-8/+11
| | | | | | | | | Use a QScopeGuard to fix its restoration of left-to-right mode after completion. Change-Id: I5ac1e44629e72d993f2d5ba6586b86508d57cdaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix compiler warnings from QKeyCombinationLars Knoll2020-09-287-17/+18
| | | | | | | | Change lots of code to avoid the deprecated operator+() or implicit casts to int. Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* fix QComboBox currentText return placeholderTextWang ChunLin2020-09-251-1/+1
| | | | | | | | | If it does not add item,the currentText should return empty string Fixes: QTBUG-86580 Pick-to: 5.15 Change-Id: I54c3a8b7ececfb1e62bcd7ac592feccaff3f8b48 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix redundant emission of editingFinished from QLineEdit with Return keyChristian Heimlich2020-09-231-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of QLineEdit uses the "edited" bit-field flag to prevent unnecessary emissions of editingFinished() when a line edit loses focus but its contents have not changed since the last time the signal was emitted; however, this flag is only cleared when the signal is fired due to focus loss and not when the Return/Enter key is pressed. This causes an unexpected double emission of the signal when focus is lost following a press of the Return/Enter key if the line edit's text was not further altered between the two actions. This change includes the Return/Enter press as a trigger for clearing the "edited" flag to make editingFinished()'s behavior more consistent and expected. Prevents slots in user code from triggering twice in situations where the line edit's current contents have already been handled, but still allows the end-user to force an emission of the signal via Return/Enter. The effect of the "edited" flag on the signals behavior has also been noted in the signal description as it was previously omitted. [ChangeLog][QtWidgets][QLineEdit][Behavior Change] Pressing the Return/Enter key in a QLineEdit will now also prevent editingFinished() from firing due to focus loss if the contents of the line edit have not changed since the last time the signal was emitted. See - https://forum.qt.io/topic/116902/ Change-Id: I11aadd45341337b7852da8cf5802c7c9efdd614d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-2350-60/+60
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate projectsAlexandru Croitor2020-09-224-2/+40
| | | | | | | | | Clean up the state of the projects, before changing the internal CMake API function names. Task-number: QTBUG-86815 Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix warning from shadowing virtual functionVolker Hilsheimer2020-09-171-20/+11
| | | | | | | QToolButton::initStyleOption is const. Apply some DRY while at it. Change-Id: If29a52e828bbc2aa58df2852c4c434545acfef3e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QStyleSheetStyle: Fix push button hit testing with paddingVolker Hilsheimer2020-09-151-2/+8
| | | | | | | | | | | | | Amends f9940b15f7f0fde731431626172939b9821fd660, which amended 6e1d70ae12baae4610356ec7b69635ad75a97b4e. The bevel of the button is not defined by the contentsRect, but by the borderRect that the stylesheet style calculates. Change-Id: I9a0d5bf29a06ce2270014f0d144e33cc3a1a7473 Pick-to: 5.15 Fixes: QTBUG-86587 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix compiler warnings about missing overridesLars Knoll2020-09-1314-75/+81
| | | | | Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-1111-35/+35
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qmenubar: stop doing math on an enumGiuseppe D'Angelo2020-09-071-1/+1
| | | | | | | Cast to the right datatypes. Change-Id: Ia1ba9be1b0530263e810b50408f432dca485744c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Extend test blacklisting from Ubuntu 18.04 to 20.04Tor Arne Vestbø2020-09-032-0/+2
| | | | | | Task-number: QTBUG-86187 Change-Id: I3ac3233f7355d1c16bc9bf6e052fdf4bd9ea90de Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use build-system to declare tests that are low-DPITor Arne Vestbø2020-08-286-8/+4
| | | | | Change-Id: I6da7204683b3c46232cfc542ed5e28131a82e87d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-262-2/+2
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_qplainttextedit: Do not use paste() method with no clipboardCristian Adam2020-08-191-0/+4
| | | | | | | | | On QNX the test fails to build because there is no clipboard feature and the code is using the paste() method which doesn't exist. Task-number: QTBUG-83202 Change-Id: Ie070ec8850b528e122e954074a1a0a3c78a14248 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warnings about unused variables and functions in testsTor Arne Vestbø2020-07-261-0/+2
| | | | | Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qnsview: don't active QWindows inside NSWindows that are not keyRichard Moe Gustavsen2020-07-221-0/+10
| | | | | | | | | | | | A QWindow should only become Active when it's inside an NSWindow that is Key. If the NSWindow is not key, we need to wait for it to be so, and handle window activation from QCocoaWindow::windowDidBecomeKey() instead. Otherwise Qt will report a QWindow as Active when, in reality, it is not. Change-Id: Ib7e63b374f26af527a668c7f7d863c4168a4446d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-0948-58/+58
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use qsizetype in QListLars Knoll2020-07-063-15/+15
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTabBar: make sure the tab is repainted after releasing mouseWang Chuan2020-07-021-0/+38
| | | | | | | | | | | | | | The tab has to be repainted even f the mouse release event happened outside the tab bar, otherwise it will look like the tab is still pressed. As a drive-by, replace the repaint() call with update(); there is no need for synchronous painting in an event handler. Pick-to: 5.15 Fixes: QTBUG-81637 Change-Id: Ia55182be906511ac3b462f00add8a621c6c05fc3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVector in widgets testsJarek Kobus2020-06-254-6/+5
| | | | | | Task-number: QTBUG-84469 Change-Id: I490fdb237afad2d8a15954fe34d6b549a83fa4aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated QStyleOption::init()Christian Ehrlicher2020-06-211-1/+1
| | | | | | | | Even it was not marked as deprecated the replacement function initFrom() is available since Qt4 times (and init() is deprecated since then) Change-Id: I09a4ebbf66b01fbe7aec67691dc68d2e42d1cd78 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix breakage of QPushButton on macOS when a style sheet was setVolker Hilsheimer2020-06-111-0/+41
| | | | | | | | | | | | | | | | | | | | | Amends comment 6e1d70ae12baae4610356ec7b69635ad75a97b4e, which introduced SE_PushButtonBevel so that QPushButton could ignore clicks outside of the button's bevel. In the macOS style, make sure that the framerect we pass to NSButton::alignmentRectForFrame is the rect we receive from QPushButton in the style options. The frame property of the shared NSButton* object might not be initialized. In the style sheet style, handle SE_PushButtonBevel the same ways as Contents and FocusRect, as it is not a separately styleable property. Change-Id: I12eb1b046c864a02b34d276e6352e2e16d44231e Fixes: QTBUG-84852 Fixes: QTBUG-84879 Task-number: QTBUG-81452 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-083-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove winrtOliver Wolff2020-06-0630-222/+10
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>