Commit Graph

3045 Commits

Author SHA1 Message Date
Liang Qi
d8c078c2b6 tests: skip tst_QGraphicsProxyWidget::scrollUpdate() on Wayland
QWindow::requestActivate() is not supported.

This function failed in test vm in coin manually very often.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I013651b0e5e7618c29742effd85a091ca95a7414
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-21 13:58:19 +02:00
Axel Spoerl
b1054d45e9 Fix flakiness in tst_QDoubleSpinBox / editingFinished
setFocus() was called on a double spinbox without calling show()
first. That causes flakiness on XCB when checking focus afterwards.
The test can still fail, when focus is acquired by e.g. a system
popup.

This patch adds a show() call before setFocus() to stabilize normal
behavior. In case the double spin box is shown, but cannot acquire
focus, the test is skipped.

Fixes: QTBUG-70088
Change-Id: If02e88800a31b09a1da63dcc074eb8bb1b0df391
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-10-18 11:31:25 +00:00
Liang Qi
673f89d62c tests: skip tst_QWidget::touchEventSynthesizedMouseEvent() on Wayland
Task-number: QTBUG-107157
Pick-to: 6.4 6.2
Change-Id: I88df3215aceb7a619b4c1fbc2f457400a1bc7025
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
f990c256eb tests: skip tst_QCompleter::showPopupInGraphicsView() on Wayland
Task-number: QTBUG-107186
Pick-to: 6.4 6.2
Change-Id: I1f67c0b7c70dec210989073660db6b03afb98fff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
ca3c72b27a tests: skip tst_QWidget_window::mouseMoveWithPopup() on Wayland
Task-number: QTBUG-107154
Pick-to: 6.4 6.2
Change-Id: I94149e8ffdb834b44c605cfd9bdea7e9f458dc90
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
a16fd6bbe2 tests: skip tst_QWidget::setWindowGeometry() on Wayland
Task-number: QTBUG-107157
Pick-to: 6.4 6.2
Change-Id: I65a21898d6a5d40a4e7e9eeecf1e2398e45d97fe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
7f27189d90 tests: skip tst_QGridLayout::setMinAndMaxSize() on Wayland
Task-number: QTBUG-107184
Pick-to: 6.4 6.2
Change-Id: Iddc280acd18e230d1ae778ccb6d7d17a8ff3d76c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
3846b27dd8 tests: skip tst_QWidget_window::resetFocusObjectOnDestruction() on Wayland
QWindow::requestActivate() is not supported.

Fixes: QTBUG-107155
Pick-to: 6.4 6.2
Change-Id: I3a3ce04695ce5039229ce51d80948c62456f5944
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:52 +02:00
Liang Qi
ca8554d338 tests: tst_QWidget::renderChildFillsBackground() passes on Wayland
This amends 1453f048f5.

Task-number: QTBUG-107157
Pick-to: 6.4
Change-Id: I606dd2013e11a4f7639fea59d75091191fd30d87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:52 +02:00
Liang Qi
89b54bb4ec tests: skip a few tests in tst_QWidget on Wayland
QWindow::requestActivate() is not supported.

* tst_QWidget::dumpObjectTree()
* tst_QWidget::enterLeaveOnWindowShowHide()
* tst_QWidget::imEnabledNotImplemented()
* tst_QWidget::activateWhileModalHidden()

Task-number: QTBUG-107157
Pick-to: 6.4 6.2
Change-Id: Ic8e0eeff05cfc4e6dc16fc570caf80a1dcc57800
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:52 +02:00
Liang Qi
584aa8ad41 tests: skip tst_QWidget::renderInvisible() on Wayland
Task-number: QTBUG-107157
Pick-to: 6.4 6.2
Change-Id: I405a5dfc915b754e30389208cc0bdb01f17ed166
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-14 17:18:52 +02:00
Volker Hilsheimer
9eca8d62fa Fix memory leak and clean up splitter test
Allocate the QSplitter on the stack so that it and its child widgets are
cleaned up when the test function finishes.

As a drive-by, replace QString usage with QByteArray to avoid unneeded
conversion from and to latin1, and modernize list construction and for loop.

Pick-to: 6.4 6.2
Change-Id: I2e29961edbab1ec88be356fca6bc100f08894e82
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-14 16:34:47 +02:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
Marc Mutz
dd562b3672 Replace qExchange with std::exchange
None of these users require C++20 constexpr or C++23 noexcept, the
only remaining difference between std::exchange and qExchange.

This leaves a single qExchange() user, in QScopedValueRollback, that
requires the constexpr version, only available from C++20, and thus
remains unported.

Task-number: QTBUG-99313
Change-Id: Iea46f6ed61d6bd8a5b2fd9d9ec4d70c980b443a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-07 18:11:36 +02:00
Liang Qi
8b143f0aed tests: skip two tests in tst_QDockWidget on Wayland
This amends 9ff40b59da .

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Ie66205c5402d4346ffb61619ccb6a955623f5984
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:24 +02:00
Liang Qi
e37baad7fc tests: skip tst_QAction::disableShortcutInMenuAction() on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Iacdcf4ad4f6da4a5a996f26d3b97fb507a4b116b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:22 +02:00
Liang Qi
7d38320c4b tests: skip two tests in tst_QAbstractItemView on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I9080fbb0ae0a604ad4a7ffa55ba3243d1cf96be8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:21 +02:00
Liang Qi
1dcd4d7171 tests: skip tst_QGraphicsView::embeddedViewsWithFocus() on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Ie9583e55d298fe392d8ab09e9a10d8fce5ce3fee
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:18 +02:00
Liang Qi
a247da320c tests: fix window activation usage in tst_QGraphicsWidget
- Skip tests that depend on programmatic window activation on platforms
  where this is not supported, such as Wayland.
- Change tests that don't rely on the window being activated to use
  qWaitForWindowExposed() instead.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Ieb4280343a725a2cbdc46a8ac5c657beeb2e7e57
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:16 +02:00
Liang Qi
19dabbbc73 tests: skip two tests in tst_QGraphicsProxyWidget on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I41c0c24c73ea5add821109172470d37a9b6211a8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:15 +02:00
Liang Qi
65d9b48a70 tests: skip tst_QDialog::showAsTool() on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Id8f9cc1d6a29b4d608a080f5b40a5369d7bd8da9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:13 +02:00
Liang Qi
dd608329b2 tests: skip tst_QApplication::activateDeactivateEvent() on Wayland
Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I69bd4a0d4217b5e4c2cbee8b25c5bd69509e3329
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-10-07 13:20:10 +02:00
Axel Spoerl
b439f06941 Remove focusProxyAndInputMethods from tst_QWidget
focusProxyAndInputMethods tests focus acquisition and inheritance with
a toplevel widget, acting as a focus proxy for a child.
X11 window managers are set to be bypassed, programmatic focus is set
with QApplicationPrivate::setActiveWindow().

The test is flaky on Linux/XCB, and therefore blacklisted on most
Linuxes.

This patch removes focusProxyAndInputMethods, considering that
- focus proxying is tested in tst_QWidget::focusProxy()
- window activation and focus inheritance are tested in
tst_QWindow::isActive()

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I510fd935399d9ad0b6cd76f1bd5db0811e0702f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-06 10:49:16 +02:00
Marc Mutz
df9d882d41 Port from container.count()/length() to size()
This is semantic patch using ClangTidyTransformator:

  auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.

<classes> are:

    // sequential:
    "QByteArray",
    "QList",
    "QQueue",
    "QStack",
    "QString",
    "QVarLengthArray",
    "QVector",
    // associative:
    "QHash",
    "QMultiHash",
    "QMap",
    "QMultiMap",
    "QSet",
    // Qt has no QMultiSet

Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-04 07:40:08 +02:00
Eirik Aavitsland
72a3da3d4d Style sheets: add placeholder text color property for edit widgets
The placeholder text was given its own QPalette color role in Qt 5.12,
but there has been no way to specify it from a Qt style sheet.

Fixes: QTBUG-93009
Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-29 08:20:56 +02:00
Eirik Aavitsland
df0b70eece StyleSheetStyle: Fix color of placeholder texts in text edits
Prior to 5.12, the placeholder text color was hardcoded to be the same
as the text color, but with an alpha of 128, i.e. semi-transparent. In
5.12, it instead got its own ColorRole in QPalette. So behavior
changed (In some cases in 5.12 and later, consistently from Qt 6):
placeholder texts no longer got a "light" (semi-transparent) version
of the css-styled color, but just the default gray/semi-transparent
black. That problem was reported as QTBUG-89815. However, the fix for
that bug did not apply the semi-transparency, but only used the same
color as the text. That caused a confusing visual expression, as
actual and placeholder text would look the same. This commit fixes
that.

The problem was made worse since there is no way to specify the
placeholder text color from css, i.e. to style it independently. A
follow up commit will aim to add that.

Fixes: QTBUG-92199
Task-number: QTBUG-93009
Pick-to: 6.4 6.2 5.15
Change-Id: I9e6698d34eba91cbf65c4da07aa5ac6d9f96a9ed
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-27 20:22:02 +02:00
Axel Spoerl
10a143ccd7 Prevent dock widget from resizing upon unplugging from main window
QDockWidgetLayoutState::itemRect() has been used to calculate a dock
widget's size when unplugging from the main window. This method is meant
to calculate the size of the rubber band, showing the dock widget's
dock area.

The rubber band is by QDockAreaLayout::sep wider (top or bottom dock)
or higher (left or right dock) than the respective dock widget. This is
to make sure the rubber band is never fully covered by the dock widget.

By wrongly using itemRect() also for the dock widget's size after
unplugging, the dock widget grows in size each time it is unplugged.

This patch passes an invalid QRect to QDockWidgetPrivate::unplug(), in
order to prevent resizing.

tst_QDockWidget::unplugAndResize() is extended to check size
consistency after unplugging (corrected for frame margins).

Fixes: QTBUG-106531
Pick-to: 6.4 6.2
Change-Id: I1cf9f695691b0e165a5cb2881781602426e5d587
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-21 18:41:43 +00:00
Edward Welbourne
89d58147ea Fix use of 0 as null pointer in tst_QDateTimeEdit
Change-Id: Ie529150801e3bbfc7c3203e49f712239cb3e82bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-20 19:47:34 +02:00
Tor Arne Vestbø
2e58e242b4 Don't rely on synthetic mouse events in updateFocusChainWhenChildDie test
Synthetic mouse events are not reliable, as the platform might restrict
synthetic mouse moves. In addition, the WM might automatically activate
the window when the other window is hidden, which makes the EXPECT_FAIL
flakey.

Since the test was not written to test window activation, let's just
explicitly activate the window.

Fixes: QTBUG-23699
Pick-to: 6.4
Change-Id: I0ac1d3bc0658dfbd600a1f5d960839860be6dd2c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-14 19:07:14 +02:00
Tor Arne Vestbø
63754bd7ae Blacklist tst_QGraphicsWidget::updateFocusChainWhenChildDie() on macOS 13 in CI
For some reason when running this test on macOS 13 in the CI the window
is activated, as on other platforms, but this is not reproducible
locally, so we can't just remove the QEXPECT_FAIL.

Task-number: QTBUG-104210
Task-number: QTBUG-23699
Change-Id: Ib1cacb36d90d2be357756c82af2427f2b3ab9999
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-13 18:19:38 +02:00
Sona Kurazyan
b077c419ea Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.h
And include qcore_mac_p.h where needed.

Task-number: QTBUG-99313
Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-01 13:26:30 +02:00
Heikki Halmet
191419e980 Blacklist: tst_QGraphicsAnchorLayout::layoutDirection for Ubuntu 22.04
Task-number: QTBUG-87728
Pick-to: 6.4 6.3 6.2
Change-Id: Ic78a17146c265ffe6baf6f08a0f9c29750bd0d58
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-08-31 00:39:25 +03:00
Tor Arne Vestbø
2436e259ce Deprecate QApplication::setActiveWindow() and mark as internal
The function is used the internal window activation machinery and
should not be called by user code.

Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.

Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-27 20:22:29 +02:00
Axel Spoerl
b48364d49b Replace logging category lcQpaDockWidgets in dock widget auto test
Logging category lcQpaDockWidgets was used in both dock widget test
and implementation. This dual use caused static builds to fail.

This patch replaces lcQpaDockWidgets with a test specific logging
category in tst_QDockWidget.

Pick-to: 6.4 6.3 6.2
Change-Id: I02cdfdaee9c1c1840126d803139b3d271aeac236
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-26 22:27:50 +02:00
Axel Spoerl
0c54ac20eb Add QDockWidget save & restore auto test
Implement auto test for (de)serialization of dock widget properties.
Test settings compatibility by importing a hard coded byte array.
Test serialization format and sequence by comparing expected and real
serialization output.
Test dock widget closing behavior (QTBUG-103474) to ensure that
no closing inconsistency is caused by serialization incompatibility.
Extensively document/comment the test to ensure failures can be easily
interpreted in the future.

Task-number: QTBUG-103474
Change-Id: I3c1589c2c291b2ed56334d09b85536d4c7388f92
Pick-to: 6.4 6.3 6.2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-26 17:08:04 +00:00
Volker Hilsheimer
52f4d0b0d2 QAbstractItemDelegate: tolerate that editor gets reparented
An item delegate might override destroyEditor to merely reparent the
existing editor out of the item view for later reuse, rather than
actually destroying the editor.

As of d0dffdfc01, the code calling
closeEditor() - which calls destroyEditor - might explicitly set focus
back to the item view parent of the editor. This needs to handle that
the parent of the editor might no longer be valid after the closeEditor
call returns, and rather store the old parent widget explicitly.

Add a test case that segfaults with nullptr access without the fix.

Fixes: QTBUG-105231
Pick-to: 6.4 6.3 6.2
Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-08-25 18:04:19 +02:00
Ivan Solovev
c6c41cc1a9 QtBase tests: remove QT_DISABLE_DEPRECATED_UP_TO defines
The value will be propagated from Qt build.

Task-number: QTBUG-104858
Change-Id: Iae2c32c3037438f41b92f9ee28004f30eb4e3210
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-24 22:08:49 +02:00
Ivan Solovev
e5c184ecd1 tst_qshortcut: port away from deprecated APIs
Explicitly call QKeycombination::toCombined() instead of deprecated
implicit operator int().

Task-number: QTBUG-104858
Pick-to: 6.4
Change-Id: I46b0863eda445e832a9490bc2a3d05811c2df8c6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 22:08:49 +02:00
Ivan Solovev
6180e496c2 tst_qmessagebox: port away from deprecated methods
* Wrap some tests that specifically test deprecated APIs
  into #ifdefery
* Refactor some tests to use available methods

Task-number: QTBUG-104858
Change-Id: I03e318004ce1c2718ee574bf11e00df9bc04bcaa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 22:08:48 +02:00
Axel Spoerl
854cb55987 Make QHeaderView restore state from different stream versions
If restoring a QHeaderView state from a data stream with version Qt_5_0,
check alignment and resize mode properites for out-of-bound values.

If out of bounds, try QDataStream version Qt_6_0, which is used by KDE
apps compiled with 5.15.2 or 6.2.3.

QFileDialog stores settings in the same settings file across different
Qt versions, using different QDataStream versions. That makes
QFileDialog vulnerable to the issue (QTBUG-104962). A respective auto
test is added with this patch.

Fixes: QTBUG-104962
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104425
Change-Id: I666207fca7ab837ad27a247e504a40757ee8afab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 14:08:18 +00:00
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Axel Spoerl
7c61eb101d Revert Q_DECLARE_EXPORTED_LOGGING_CATEGORY in tst_qdockwidget
Q_DECLARE_EXPORTED_LOGGING_CATEGORY is available from 6.5 only, hence
cherrypicking this solution fails.

Change-Id: Ib3351a8846bb5cf6047cd2d13c9f7cd242df9c93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-23 20:49:47 +02:00
Tor Arne Vestbø
1ecfc4101c tst_qgraphicswidget: Avoid redeclaration of Size from MacTypes.h
If an included header brings in MacTypes.h it will cause issues,
so rename the enum to be on the safe side.

Pick-to: 6.4 6.3 6.2
Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-21 14:40:38 +02:00
Ivan Solovev
3226c82740 Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO
The new name describes the behavior in a better way.

[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.

Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 23:52:05 +02:00
Assam Boudjelthia
2c6e71e562 Android: fix Android filedialog and completer tests
* https://developer.android.com/training/data-storage/use-cases#opt-out-
in-production-app

Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: If6abb48b730b9b33807f5f6648e1360defc090a6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 10:51:54 +00:00
Volker Hilsheimer
371214dea7 Remove network dependency for tests with UNC paths
Windows VMs are provisioned with shared folders that are available as

\\${COMPUTERNAME}\testshare(writable)

so we don't need to access a remote SMB server over network anymore just
to test whether our string-parsing code handles UNC paths correctly.

Add a QTest::uncServerName() helper function to the shared filesystem.h
header and use that instead of QtNetworkSettings::winServerName. The
latter is now only used in tst_NetworkSelfTest::smbServer().

Pick-to: 6.4
Change-Id: Id0da66369ad0f4a980d612de2a31a391f1192253
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-17 23:48:00 +02:00
Dimitrios Apostolou
753c352af0 Unblacklist tests that are no longer flaky
Couldn't reproduce flakiness on OpenSUSE KDE/X11 and can't see any
history of flakiness in the last 3 months in our testresults database.

Task-number: QTBUG-62967
Task-number: QTBUG-63262
Change-Id: Id50291798eda922283e04b45205ae9105e9fdab2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
7524a36a26 Stabilize test by not activating window
Window activation is not working reliably on X11 when combined with
X11BypassWindowManagerHint, see QXcbWindow::requestActivateWindow().

The test itself counts repaints, so qWaitForWindowExposed() shouldn't be
needed.

This way we don't need to QSKIP() the test if window activation fails.

Fixes: QTBUG-98921
Change-Id: I849b7261c757fb7cbcde73f11bbe1a74a862cb9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
74f3bc263a Update BLACKLIST for tst_qgraphicsview
Removed entries that do not reproduce on OpenSUSE and that are no
longer flaky in our CI according to our testresults statistics database.

Adjusted entry for resizeAnchor testcase which has been seen flaky in
RHEL-8.4 and cursor2 which is very flaky on macOS.

Task-number: QTBUG-105249
Task-number: QTBUG-105247
Change-Id: I3e258f81d6bbf540a4b3dec763fdfd4bdc511847
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
228ee98025 Unblacklist tests that are no longer flaky
Can't reproduce in OpenSUSE, and no flakiness has been seen in the past
6 months in our testresults statistics database.

Task-number: QTBUG-63260
Change-Id: I465aa4b9f82726e9685f64b0dc235d3235c4bd9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:44 +02:00