summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* QWindow: Persist foreign winId to support destroy/create cyclesTor Arne Vestbø6 days1-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | We used to set a private _q_foreignWinId property on QWindow when creating foreign windows, and this was the mechanism which we then passed the foreign winId to the platform plugin. With c585802e946d97e7d177ea334a162dc7bc286b84 this was removed, since we now were passing the winId through via explicit QPA APIs, and since 0c6911e5cde24c45d6f2c08b6e71064bdd1eccfa removed the ability to explicitly destroy() a foreign window. But when closing a QWindow, we destroy both the window itself, and all its children, including foreign windows. In this case we still want to support recreating the foreign window, for example when the parent window is shown again. To enable this we restore the _q_foreignWinId private property, but keep the limitation of not being able to explicitly destroy a foreign window. Pick-to: 6.7 6.5 Fixes: QTBUG-124160 Change-Id: Ia885ba9f043e64fb21eedd2b4c344679726f1b5c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Tests: make some QFile::open calls failGiuseppe D'Angelo13 days1-1/+2
| | | | | | | | | | In some cases calls to QFile::open are made outside of a testfunction (so we can't use QVERIFY), or even in standalone executables that are executed by tests. Make them fail "visibly". Change-Id: Iec4d56f6d874be16aa2e9ad6974eeec2a98caa3f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: check the output of QFile::openGiuseppe D'Angelo2024-03-271-2/+2
| | | | | | | | | | Wrap the call in QVERIFY. tst_QTextStream::read0d0d0a was also faulty as it *never* opened the file because of a broken path. Fix it with QFINDTESTDATA. Change-Id: I61a8f83beddf098d37fda13cb3bfb4aaa4913fc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QChronoTimer, a timer with nanoseconds precisionAhmad Samir2024-03-032-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interval in QTimer is a QProperty of type int, which means it's limited to the number of milliseconds that would fit in an int (~24 days), this could cause overflow if a user constructs a QTimer with an interval > INT_MAX milliseconds. And it can't be easily changed to use qint64/std::chrono::nanoseconds: - changing the getters to return qint64 means user code would have narrowing conversions - the bindable QProperty interval can't be changed to qint64 during Qt6's lifetime without the risk of breaking user code - adding a new bindable QProperty that is qint64/nanoseconds is an option, but it has the complication of what to do with the int interval; set it when setInterval(milliseconds) is used by using saturation arithmetic? and what about notifying observers of the changed interval? Thus the idea of creating a new stop-gap class, QChronoTimer, as a cleaner solution. Both classes use QTimerPrivate. During the lifetime of Qt6, QTimer's interval range is about 24 days, whereas QChronoTimer's interval range is about 292 years (duration_cast<years>nanoseconds::max()). Currently the plan is to fold QChronotTimer back into QTimer in Qt7. Mark all QPropertyS in the new class as FINAL since they aren't intended to be overridden; this offers a performance boost for QML[1]. [1] https://lists.qt-project.org/pipermail/development/2024-February/044977.html [ChangeLog][QtCore] Added QChronoTimer, which uses a std::chrono::nanoseconds intervals, as a replacement for QTimer. Fixes: QTBUG-113544 Change-Id: I71697f4a8b35452c6b5604b1322ee7f0b4453f04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Copy QTimer source files to QChronoTimerAhmad Samir2024-03-031-0/+38
| | | | | | | Ultimately this is the best way to keep the log history of the code. Change-Id: I3413deffdb093a3239d65b6ca939e744224e722a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Implement support for backing store static contentsTor Arne Vestbø2024-02-131-0/+5
| | | | | | | | | | | | | | | We already had the machinery to copy one buffer to another, so this machinery has been generalized a bit, so we can use it to preserve the static content during buffer resize. As explained in the comments, we need to do the buffer copies during buffer creation, instead of relying on our back buffer finalization, as we are not guaranteed that we can always copy the static content from the front buffer. Pick-to: 6.7 Change-Id: Ia9b3ac6ec982949990d172b0b14f35b13bbae92a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add QPlatformIntegration::BackingStoreStaticContents capabilityTor Arne Vestbø2024-02-131-3/+5
| | | | | | | | | | | | | | This was a feature in Qt 4, but the only platform that carried it over to Qt 5 was Windows, in ab76593f18396e693f24066592244ca95e135ea2, and that's still the situation. As a first step in possibly implementing this on more platforms, lets replace the hard-coded check in QWidgetRepaintManager::hasStaticContents with a proper QPlatformIntegration capability check in the only call site. Pick-to: 6.7 Change-Id: I2067109f45116cd8c62facf7224cd748f19e845b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QBackingStore: Take DPR into account when resizing with static contentsTor Arne Vestbø2024-02-131-0/+76
| | | | | | | | | | The plumbing from QBackingStore::resize to the platform backing store was missing a high-DPI conversion for the backing store's static contents, which is also expressed in the QtGui coordinate system. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Ifaac916cbf184b9386aa5feca1577a53bf2906ed Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change license for tests filesLucie Gérard2024-02-0434-34/+34
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* tests: skip tst_QGuiApplication::topLevelAt() on WaylandLiang Qi2024-01-171-0/+3
| | | | | | | | | This amends 189f9873ae3f23377708fbf9880398fd6a078715 . Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-121015 Change-Id: I66d2a2b0162b9c7b488af840ff5d3a881b657782 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Don't include windows.h in the public qopengl.h headerVolker Hilsheimer2024-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | All we need are the APIENTRY and WINGDIAPI macros, as those are used in the gl.h header. Define those locally for the time we need them. Use a QT_APIENTRY macro instead of hijacking APIENTRY for when we declare OpenGL functions with the stdcall calling convention. A few build fixes needed in tests that used Windows types without explicitly including windows.h first, or that (incorrectly) included one of the sub-headers of windows.h (like winuser.h). [ChangeLog][Potentially Source-Incompatible Changes][OpenGL] On Windows, the public qopengl.h header no longer includes windows.h. Pick-to: 6.7 Fixes: QTBUG-120687 Change-Id: I3770ac8eaeee5bcf4e7234e5a2539935a8aa5a7d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* tests: XFAIL tst_QShortcut::windowShortcut() on WaylandLiang Qi2024-01-101-0/+4
| | | | | | | Pick-to: 6.7 Task-number: QTBUG-120334 Change-Id: I6cafda6fa8f8c9b20a6695b982413057ddf56dd2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* tests: skip tst_QShortcut::applicationShortcut() on WaylandLiang Qi2024-01-102-0/+7
| | | | | | | Pick-to: 6.7 Task-number: QTBUG-120334 Change-Id: I0c71c6f474f1a0f31bc823579a54556a3e64bda2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Replace uses of QWheelEvent with newly added QTest::wheelEventDoris Verria2023-12-201-7/+3
| | | | | Change-Id: I83fdc4cc3328fd178b054bef3113bf5df75d71cf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Tests: remove blacklisted CIs no longer availableChristian Ehrlicher2023-12-061-2/+0
| | | | | | | | | | | | | | | | Remove the following CIs from BLACKLIST files as they are no longer used: - msvc-2015 - msvc-2017 - windows-7sp1 - opensuse-42.3 - ubuntu 16.04/18.04/20.04 - rhel 6.6/7.4/7.6 - redhatenterpriselinuxworkstation-6.6 Change-Id: Ief9550e3455a1ed211d978933262c8d5557b0fec Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Skip test cases that resizes window on eglfs_viv on VxWorksMarcin Zdunek2023-12-051-0/+3
| | | | | | | | This change is required when running in real hw with eglfs backend. It passed on CI because CI used "offscreen" backend and eglfs is not tested on CI at the moment. Task-number: QTBUG-115777 Change-Id: I4bbfbedcbe21c5c2041be9bdb8ae370156bb6200 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Disable tst_ForeignWindow::embedForeignWindow() null-parent check on LinuxTor Arne Vestbø2023-11-221-0/+3
| | | | | | | | It's flakey, so let's unbreak the build while we investigate further. Pick-to: 6.6 Change-Id: I9f7559803dd3ebc80946e5e5c5d31292101cd36f Reviewed-by: Liang Qi <liang.qi@qt.io>
* tst_QTimer: refactor CMake codeAhmad Samir2023-11-221-14/+17
| | | | | | | | | It's used to build different variations of the unittest, linking against QtCore-only/QtGui, with/without GLib, that's four individual tests. Change-Id: Iaf0f37041dbb148134631f86be99feaa881a8ce8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stabilize tst_ForeignWindow::embedForeignWindow()Tor Arne Vestbø2023-11-191-5/+1
| | | | | | | | | | We only care about no longer being a child of the old parent window, not what the system does when we reparent to nullptr. Pick-to: 6.6 Change-Id: Ibd670432f0fd2595195d3951014a570dfdb7a998 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add dedicated child and parent events for QWindow reparentingTor Arne Vestbø2023-11-171-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | When a QWindow is parented into another window, either via its constructor, or via setParent(), we also update the QObject parent of the window. This in turn sends ChildAdded and ChildRemoved events to the new and old parent of the window, as well as ParentAboutToChange and ParentChange to the window itself. But at the point when these events are sent, the QWindow parent relationship has not been fully established. We have not updated d->parentWindow, nor have we propagated the parent relationship to the platform window. This is problematic because clients can not use these events to react to window parent changes synchronously. For example. trying to raise a child window when added to a parent is not going to work, because at that point the child window isn't a native child of the parent. Instead of re-using the QObject events for QWindow, like QWidget does, by delaying the events or sending them manually at a point when the window parent relationship has been fully formed, we opt to add new dedicated events. Change-Id: I019c14eba444861f537e4f68ab3a82297f843cf7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Prevent reparenting of foreign window embedding containerTor Arne Vestbø2023-11-151-0/+45
| | | | | | | | | | | A foreign window used to embed a Qt window into it should not end up with changes to its own parent, as its only job is to give the embedded Qt window a parent handle. Pick-to: 6.6 Change-Id: If1bc89658fedf449d266bc0cc750c90b6a841a68 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* macOS: Take window mask into account when computing QCocoaScreen::topLevelAtTor Arne Vestbø2023-11-151-0/+33
| | | | | | | | | | | | | | Although not explicitly documented, this is the behavior in practice on XCB and Windows, and we rely on this behavior in our implementation of QApplication::widgetAt(), where we punch a temporary hole in the widget using a mask if it has Qt::WA_TransparentForMouseEvents set. Pick-to: 6.5 6.6 Fixes: QTBUG-41696 Task-number: QTBUG-119092 Change-Id: Ie7abc31b6930ee6b56fcdf391befc625c1ddf502 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QGuiApplication: check return value of platformTheme::palette()Christian Ehrlicher2023-11-141-0/+10
| | | | | | | | | | | Under some circumstances (e.g. setDesktopSettingsAware(false) on windows) it may happen that the call to platformTheme::palette() returns a nullptr which is not checked before dereferencing the pointer. Therefore add a check for this to avoid a crash. Fixes: QTBUG-111527 Change-Id: I6443d5d1a9b813f499d8f65b4fee55b0b8299b16 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add checking if using eglfsMarcin Zdunek2023-11-131-0/+31
| | | | | | | | | | | We are using eglfs in VxWorks which make 3 few testcases fail, because eglfs windows are fullscreen by default. This is the same solution as in qt5 in tag 5.12.6 from commit with hash 39027ef076c. [...] EGLFS forces the first top-level window - either a QWidget or a QQuickView - to become fullscreen. [...] from: https://doc.qt.io/qt-6/embedded-linux.html Change-Id: I3ab3208b3c7c1b2e27d879bac1ee0679f48109e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* tst_QWindow::setVisibleThenCreate(): Fix unused argument warningTor Arne Vestbø2023-11-131-1/+1
| | | | | | | | Use the arguments to call the parent class implementation. Pick-to: 6.5 6.6 Change-Id: I602a66447fb8681b3ec9ef8e2e281828612d178c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Ensure foreign window can be reparented out of contained window againTor Arne Vestbø2023-11-131-1/+8
| | | | | | | | | A foreign window embedded into a Qt hierarchy must also support being removed from that window hierarchy. Pick-to: 6.6 Change-Id: Id4d08079ff19d67a8989937bc72602e8bd14b31b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Check NSWindow as well when determining if setVisible can bail outTor Arne Vestbø2023-10-301-0/+20
| | | | | | | | | | | | | | | | In be268ae19731ab854931e43eea83e0e140ec2538 we made QCocoaWindow::setVisible idempotent by checking if NSView.hidden needed update. This failed to take into account the case when a window is moved from being a child window to a top level, where the window is still visible and the NSView's hidden state doesn't change, but we need to order in the NSWindow that we're now managing. We now check NSWindow.visible as well, if we're a top level window. Pick-to: 6.5 6.6 Change-Id: I94434d6ebfe2c9ece6eac7f83f17ead250ccc07a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Avoid creating child windows twice when already visibleTor Arne Vestbø2023-10-211-0/+35
| | | | | | | | | | | | | | | | | | | | | | | When a child window is made visible without its parent having been created yet, we defer creating and making the child visible until the parent is created. But if a child window is explicitly created, we create the parent first. And creating the parent will in turn apply visibility to all children that had their visibility deferred. Which includes creating the child. This results in child -> parent -> child creation recursion, which means that when we return from creating the parent window we already have a platform window for our child, and should bail out. Pick-to: 6.6 6.5 Change-Id: I11dc4864b57f031de2cca70b79cdfc057d4fbd0d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Include what you need: <QPointer>Marc Mutz2023-10-122-0/+4
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I3321cccdb41ce0ba6d8a709cea92427aba398254 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_QInputMethod: Don't assume test is the only one calling functionsTor Arne Vestbø2023-10-101-4/+4
| | | | | | | | | | | After d9bb8c0a1702ed345ddacdc0179a43d1dc4722a7 we call inputDirection() on the platform input context to initialize the direction at startup. The test can't assume there are no other callers to the functions in the QPlatformInputContext layer. Change-Id: Ic1cecd608b2759e703a17838fcf24b4ff53ad07e Reviewed-by: Liang Qi <liang.qi@qt.io>
* QKeySequence::toString(): Treat Modifier+Qt::Key_Unknown as empty stringTor Arne Vestbø2023-10-091-0/+1
| | | | | | | | | | | | We were already doing this for a key combination without modifiers, but now we do the same for e.g. Control+Unknown. This matches the behavior we have for QKeySequencePrivate::decodeString(), where we return Qt::Key_Unknown if we can't resolve the key, even if we have resolved some valid modifiers, e.g. "Meta+Trolls" as in the tst_QKeySequence::parseString() test. Change-Id: I238e29276e6ce356ae60c67585739587fa388f07 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add QShortcut test for Qt::ApplicationShortcutTor Arne Vestbø2023-10-041-2/+24
| | | | | | | | | | | | A Qt::ApplicationShortcut shortcut is not tied to a specific window. We do however document that the shortcut "is active when one of the applications windows are active", which seems like a strange limitation, but for now we honor it in our test as well by making another window active. Change-Id: I235230ff69df29ee43d356d3efaeedb20071faf3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Simplify tst_QShortcutTor Arne Vestbø2023-10-021-31/+2
| | | | | | | | | | There's no need for the manual sendKeyEvent, as QTest already has the ability to send synthetic clicks, and we don't need a colored window to test shortcut activation. Pick-to: 6.6 Change-Id: I8409888664e2316bec4ea64f21dbb8b6915091f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* xcb: Reflect geometry of foreign window on creationTor Arne Vestbø2023-09-121-2/+0
| | | | | | Pick-to: 6.6 Change-Id: I305b256696a32454f64c12c5a8901b65506fc520 Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: Implement native window helper for embeddedwindows/foreign window testTor Arne Vestbø2023-09-122-2/+9
| | | | | | Pick-to: 6.6 Change-Id: I73720f8f49a5d7e5df7c95bf4b17ef910180e01c Reviewed-by: Liang Qi <liang.qi@qt.io>
* QTimer: extend property tests and fix binding loopIvan Solovev2023-09-031-0/+2
| | | | | | | | | | | | | | | The bindable property tests were not using the QTestPrivate helpers, so add a new test which uses them. The new tests revealed a binding loop for the interval property. Fix it in a usual way by explicitly removing the binding and using {set}ValueBypassingBindings() in the setter. Task-number: QTBUG-116346 Pick-to: 6.6 6.5 Change-Id: If94f57938da449a68e3527aead5ebd55ba410adb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Mark all of Qt as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Rename accent color in QPaletteSanthosh Kumar2023-08-181-6/+6
| | | | | | | | | | Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Deprecate Q_ASSUME()Thiago Macieira2023-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | We've known for a long time that this is producing worse code with GCC because of how we implemented in Q_ASSUME_IMPL(). So bite the bullet and actually deprecate the macro, replacing all extant Q_ASSUME() with Q_ASSERT(). The replacement is in C++23. Backporting the support onto Q_ASSUME_IMPL was previously rejected by reviewers. [ChangeLog][Deprecation Notice] The Q_ASSUME() macro is deprecated. This macro has different side-effects depending on the compiler used (GCC compared to Clang and MSVC), and there are certain conditions under which GCC is known to produce worse code than if the macro was absent. To give a hint to the compiler for optimizations, use the C++23 [[assume]] attribute. Change-Id: I80612a7d275c41f1baf0fffd177a3a4ad819fb2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QEventDispatcher: test with glib disabled tooAhmad Samir2023-08-111-5/+26
| | | | | Change-Id: I05f09e720170c77a567ffea31dfe06a658f1df2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_foreignwindow: Add basic test of foreign window reparentingTor Arne Vestbø2023-08-071-0/+19
| | | | | | Pick-to: 6.6 Change-Id: I008fad0f6527503a13ded4818eec5cb280f65cf4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tests: Move NativeWindow helper class to shared headerTor Arne Vestbø2023-08-031-108/+1
| | | | | | | Pick-to: 6.6 Change-Id: Ia7dc54aa761fdfde42d49a41475a4fbc74036aeb Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tst_foreignwindow: Run test with high-DPI disabledTor Arne Vestbø2023-08-021-0/+1
| | | | | | | | | | To avoid having to take high-DPI scaling into account for geometry calculations/comparisons. Pick-to: 6.6 Change-Id: I941b74781264455b70520df8d1e6e91592e00310 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Enable Objective-C++ language for standalone test projectsTor Arne Vestbø2023-08-011-0/+1
| | | | | | | | Amends 8450ab8dec83f075ee028f35b3035c9478fa13ce. Task-number: QTBUG-93020 Change-Id: Ied86754dbcd216a73cc77135c2c45303463d28d2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: temporarily skip tst_qprinterinfo, tst_qwidget and tst_qwindowAssam Boudjelthia2023-07-261-0/+4
| | | | | | | | | | | Those tests often fail on Android 13 on RHEL 8.6 and 8.8. This patch skips them to unblock CI while the underlying reasons are investigated and fixed. Task-number: QTQAINFRA-5606 Change-Id: If088d69c2160470ef50b2e74cd9b9399451c526d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Android: Fix for checking clipboard text mime typeBartlomiej Moskal2023-07-123-2/+26
| | | | | | | | | | | | | | | | | | | | | Different mime types are widely used on mobile devices. For example all text copied from gmail is copied as text/html type. After 2937cf91c74b6562bf56e8872dfd2bfaafebb3cc commit there is a regression that makes it impossible to paste any text different than "text/plain". To fix it, any "text/*" mime type should be treat as it contains a text (not only "text/plain"). That will allow to paste different text mime types. During this work also tst_qclipboard testset was turned on for Android and new test (getTextFromHTMLMimeType) was added. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-113461 Change-Id: I3ef9476b8facdc3b61f144bd55222898390127c9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Make gui tests standalone projectsAlexandru Croitor2023-07-0533-0/+198
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I2ef59684cf297a0222a136ce7b5630037294d000 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: skip tst_QWindow::enterLeaveOnWindowShowHide() on WaylandLiang Qi2023-06-271-0/+3
| | | | | | | | This amends 79ac43053798763828d51c79f6368465b1db1c87. Pick-to: 6.6 Change-Id: Id68daff20de11361a1bb20071266e8adafe5e9c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a test case for an invalid min/max size pairInho Lee2023-06-271-0/+7
| | | | | | | Task-number: QTBUG-113233 Pick-to: 6.6 6.5 Change-Id: Iad3f2f5d98637dbbe2ad6b23027ffdd942fb05d3 Reviewed-by: Liang Qi <liang.qi@qt.io>