Commit Graph

58425 Commits

Author SHA1 Message Date
Edward Welbourne
f6e9279ead tst_QAtomicInt:fetchAndAdd(): remove two duplicate data rows
Change-Id: I6568399945f421a18ddb5c52c68f82474de936c5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-17 15:53:32 +02:00
Edward Welbourne
8bb0d2308e tst_QStringApiSymmetry: use startpos to deduplicate indexing data tags
The tests for indexOf() and lastIndexOf() had duplicate data row tags,
due to only using the needle and haystack, although some tests
differed only in start position. Include start position where needed.

Change-Id: I197d415265ab1a805f2d36fb88aec92ea8646f7a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-17 15:53:32 +02:00
Edward Welbourne
5b70546c17 tst_QStringApiSymmetry: avoid repetition in trimmed_data()
Enclosing one string in each substring of another does not need to
repeat the empty substring of the latter. Extracting the empty
substring from different positions doesn't get different results.
In the process, tidy up the code a bit.

Change-Id: Ic66febbdadeaac0c466f4f1174d831a991d31e20
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-17 15:53:32 +02:00
Edward Welbourne
781bd075a6 tst_QStringApiSymmetry: eliminate one duplicate of a mid_data() row
There were two copies of the same line in mid_data(), leading to
duplicated data row tags.

Change-Id: Ia21e855ff781b13fe18c932cff48cb0aabd12750
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-17 15:53:32 +02:00
Robert Griebl
f7e2984a1a Fix QComboBox supressing a QDialogs default button
Commit 64ffe0a broke pressing RETURN aka. the default key in a dialog
to close it, when a read-only QComboBox has the focus.

Before that patch, Enter + Return were actively ignore()d, but this
code path was removed, resulting in those keys to be auto-accepted.

Fixes: QTBUG-107262
Pick-to: 6.4
Change-Id: I3dd8dca7d2f9d94f5172adc92ef508fe81c0df57
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-17 15:53:32 +02:00
Marc Mutz
3d6f5e95f0 Update Catch2 to v2.13.10
Two patches applied to upstream release.

Pick-to: 6.4 6.2
Fixes: QTBUG-103321
Task-number: QTBUG-99122
Change-Id: Ief451a21e5f61851cb03a9ca94ffe0f864e4b1f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-17 14:07:43 +02:00
Laszlo Agocs
2d381001da Add missing repaintManager check
This is likely a problem only after the 6.4 changes to move QQuickWidget
composition from OpenGL to QRhi.

Add an extra check to the condition when bailing out.

In QWidgetPrivate (qwidget.cpp) all similar calls into the
repaintManager are guarded by

  if (tlwExtra && tlwExtra->backingStore && tlwExtra->repaintManager)

therefore it makes sense to perform the same check in the other file too.

The assumption is that the check was not added here due to being outside
of qwidget.cpp.

Change-Id: Ic94d4e5153f4a194a997cd669b0f7c48c7932d97
Fixes: QTBUG-107166
Pick-to: 6.4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-17 09:03:16 +02:00
Timur Pocheptsov
6e288701e8 QIosMenu - do not check -undo: and -redo: selectors
With the latest Xcode 14 an attempt to 'Archive' and distribute an
app to the App Store Connect ends with a strange warning:
"App Store Connect operation Error The app references non-public
selectors in Payload/appname.app/appname: redo:, undo:". Googling
finds many similar reports and complains (with a bunch of different
selectors suddenly reported as non-public). We filter out undo/redo
instead, the selectors without parameters.

Change-Id: I9667dc61f650f6b6ec42c64a9aa6fbff57fe5049
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-17 08:55:33 +02:00
Marc Mutz
bda3628402 Port qUncompress() to zstream/inflate()
The zlib convenience API we've been using so far has two problems:

- On Windows-64, where sizeof(long) == 4, the use of ulong for sizes
  meant that we could not uncompress data compressed on other 64-bit
  platforms (Unix). While zstream also uses ulong, being a stream API,
  it allows feeding data in chunks. The total_in and total_out members
  are only required for gzip compression and are otherwise just
  informational. They're unsigned, so their overflow does not cause
  UB. In summary, using zstream + inflate() allows us to decompress
  more than 4GiB of data even on Windows-64.

- On all platforms, if the size hint in the header was too short, we'd
  double the output buffer size and try again, from scratch. Using
  zstream + inflate(), we still need to reallocate, but we can then
  let zlib pick up where it left off when it ran out of output buffer
  space. In all but the most pathological cases, copying the
  already-decoded data instead of re-decoding it again should be
  faster, esp. if QArrayData uses realloc() instead of malloc() +
  free() to grow the buffer.

We also now directly allocate at least as much output buffer as we
have input, to cut the first few rounds of reallocations when the
expectedSize was created, as qCompress still does, using modulo
arithmetic mod 4GiB instead of saturation arithmethic.

Factor the growing of the output buffer into a wrapper function,
flate(), which can be reused when porting qCompress().

This completely fixes the uncompression side of QTBUG-106542 and
QTBUG-104972.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Task-number: QTBUG-106542
Change-Id: I97f55ea322c24db1ac48b31c16855bc91708e7e2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-16 23:01:36 +02:00
Marc Mutz
e37c0c20bc QHash: simplify HashSeedStorage::initialize()
By not splitting Q_UNREACHABLE() and the following return, we can get
rid of the NOLINT(qt-use-unreachable-return).

Change-Id: I3322843e38dabdadb38eea38a6d91b301257fd23
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-16 11:55:34 +02:00
Shawn Rutledge
0f94430a0f testlib: make it possible to test double-clicks with discrete events
The timestamp will no longer be incremented by 500ms after a mouse
release if the delay has been explicitly specified.

The default delay is 1 ms since f5010c49a3
but the running timestamp was unconditionally post-incremented by 500ms
after every mouse release, to prevent double-clicks, which were always
deemed as unintended (because we have a mouseDClick function for that).
Now, we do that 500ms increment only if the user has not provided a
delay value in the function argument at all. We have often found it
useful in our own tests to generate double-clicks "the hard way", by
sending indivdual events, so as to be able to check state in some target
object at each step, as shown in the new snippet.

[ChangeLog][QtTest] QTest::mouseRelease() and mouseClick() can now be
used to test double-clicks, by specifying a realistic timestamp delay.

Fixes: QTBUG-102441
Change-Id: I8e8d242061f79efb4c6e02638645e03661a9cd92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-16 08:36:03 +02:00
Christian Ehrlicher
5caf808750 SQL/tests: fix tst_qsqlquery
Fix two tests which got broken due to the latest changes without
notifying because those tests are not run automatically.

Change-Id: Ibe9d9601f0a2ad4ce8f06ca21e7503e77fa55781
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-16 06:05:34 +02:00
Alexey Rochev
1d7e3ef77e QMetaType: explicitly include qobject.h
convertMetaObject() function requires definition of QObject class,
but qobject.h is not included explicitly. Instead it is pulled by
qabstractitemmodel.h.

Include it explicitly to fix builds with -no-feature-itemmodel.

Pick-to: 6.4 6.2
Change-Id: I4386375588c451262923501ab8dd7374c1f729ec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-16 04:05:26 +00:00
Marc Mutz
4af721dec1 QUrl: remove two unneeded Q_ASSERT()s
Q_UNREACHABLE/_RETURN() already contain such an assertion, we don't
need two of them.

Copy additional bits of information, if any, from the manual assertion
into a code comment.

Change-Id: I141b65d1293abf581272b2457015d4e52395d08b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-15 22:11:50 +02:00
Marc Mutz
fc76767692 Long live Q_UNREACHABLE_RETURN()!
This is a combination of Q_UNREACHABLE() with a return statement.

ATM, the return statement is unconditionally included. If we notice
that some compilers warn about return after __builtin_unreachable(),
then we can map Q_UNREACHABLE_RETURN(...) to Q_UNREACHABLE() without
having to touch all the code that uses explicit Q_UNREACHABLE() +
return.

The fact that Boost has BOOST_UNREACHABLE_RETURN() indicates that
there are compilers that complain about a lack of return after
Q_UNREACHABLE (we know that MSVC, ICC, and GHS are among them), as
well as compilers that complained about a return being present
(Coverity). Take this opportunity to properly adapt to Coverity, by
leaving out the return statement on this compiler.

Apply the macro around the code base, using a clang-tidy transformer
rule:

    const std::string unr = "unr", val = "val", ret = "ret";
    auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(",
                                    ifBound(val, cat(node(val)), cat("")),
                                    ")");
    auto ignoringSwitchCases = [](auto stmt) {
        return anyOf(stmt, switchCase(subStmt(stmt)));
    };

    makeRule(
       stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)),
            nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))),
       {changeTo(node(unr), cat(makeUnreachableReturn,
                                ";")),  // TODO: why is the ; lost w/o this?
        changeTo(node(ret), cat(""))},
       cat("use ", makeUnreachableReturn))
    );

where nextStmt() is copied from some upstream clang-tidy check's
private implementation and subStmt() is a private matcher that gives
access to SwitchCase's SubStmt.

A.k.a. qt-use-unreachable-return.

There were some false positives, suppressed them with NOLINTNEXTLINE.

They're not really false positiives, it's just that Clang sees the
world in one way and if conditonal compilation (#if) differs for other
compilers, Clang doesn't know better. This is an artifact of matching
two consecutive statements.

I haven't figured out how to remove the empty line left by the
deletion of the return statement, if it, indeed, was on a separate
line, so post-processed the patch to remove all the lines matching
^\+ *$ from the diff:

  git commit -am meep
  git reset --hard HEAD^
  git diff HEAD..HEAD@{1} | sed '/^\+ *$/d' | recountdiff - | patch -p1

[ChangeLog][QtCore][QtAssert] Added Q_UNREACHABLE_RETURN() macro.

Change-Id: I9782939f16091c964f25b7826e1c0dbd13a71305
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-15 22:11:47 +02:00
Marc Mutz
16dbbc8f8c qcompilerdetection.h: detect Coverity
Just to persist the knowledge of how to detect it for the next guy.

Pick-to: 6.4 6.2 5.15
Change-Id: I16847d02ce60fab0ae14ffb2688f2ee92fa6a9f2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-10-15 20:11:42 +00:00
David Skoland
306f1af145 wasm: change logic for copying batchedtestrunner files to build dir
The previous config did not work for prefix builds (files were not
copied over). To fix this, we simply copy over the files in case
of a prefix build.

Additionally removed batch_test_feature from the condition,
as this is now the de facto wasm test runner, which supports
batched and unbatched tests.

Change-Id: Ib232c7898de0a0d750e4ca5ebf1da8cbcc7da3e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-15 19:50:41 +02:00
David Skoland
e60e8c4ef6 wasm: Add WebAssembly to platform of built tests on module-only build
We need to make a test for wasm run in CI, and have to start small
with qtbase. This lets the tests compile and run.

Additionally, reordered the platforms for full consistency.

Apply the same change to the qtbase config.

Change-Id: If3cedffdd7f1b21215c05b9b9302df8234a47a0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-10-15 19:50:41 +02:00
Yuhang Zhao
f8c6151de1 QOperatingSystemVersion: fix newly introduced Android versions
When introducing new entries for QOperatingSystemVersion,
We should follow the new pattern [1], not the old legacy one.

Amends commit 14278bb250

[1] qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a

Change-Id: Id3444a1fba1384f9b4a410b3878ad25639b69f3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-15 21:34:20 +08:00
Yuhang Zhao
8ba8d1346a QAnyStringView: fix MSVC warning
When use /W4, MSVC warns about the code is not reachable.
It's not reachable indeed, so it's no need to include it
in the final binary, just use the same #ifdef guard to
comment it out.

Pick-to: 6.4
Change-Id: I22a321e2c748bd1c5608475d61ba9a83734c5364
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-15 21:34:20 +08:00
Yuhang Zhao
8cb832090a MSVC: Enable all possible conformance checks
For the full list, please refer to [1].

Needed to change the qstringapisymmetry unit test:
In theory we don't need the array to be static and it did compile
without any problems so far, indeed. However, with this patch applied,
MSVC complains that the lambda function below can't access the array.
I don't understand why, because we use [&] in the lambda and it should
capture all the variables in theory, but in reality it failed to
capture this variable in the end. And making the variable static
solves this issue. Maybe it's a MSVC bug.

Already tested locally. Most Qt repos build without any issues,
only very few repos are not tested, as my local environment
can't build them.

[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-conformance?view=msvc-170

Change-Id: I658427aa171ee1ae26610d0c68640b2f50789f15
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-15 13:34:20 +00:00
Joerg Bornemann
0a4d0ac013 CMake: Add filter options to qt_generate_deploy_app_script
Add the options PRE_INCLUDE_REGEXES, PRE_EXCLUDE_REGEXES,
POST_INCLUDE_REGEXES, POST_EXCLUDE_REGEXES, POST_INCLUDE_FILES, and
POST_EXCLUDE_FILES.  These are forwarded to
qt_deploy_runtime_dependencies.

Change-Id: I003814bec7f797a0035e52b17fd0231f9ad7ff0d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-10-15 13:00:17 +02:00
Joerg Bornemann
1407e0fe50 CMake: Deploy runtime dependencies outside of the Qt prefix too
We restricted the runtime dependencies we deployed on Linux to libraries
within the Qt installation prefix.  This restriction was supposed to
prevent the deployment of all kinds of system libraries, which is most
likely not wanted.

However, the user might link against non-system libraries, and those
should be deployed.  The same holds for QML backend libraries that exist
outside the Qt installation prefix in the build directory of the
project.

Now, we restrict deployment to libraries that are not in default system
library directories.  This can be overridden with the new
qt_deploy_runtime_dependencies option POST_EXCLUDE_REGEXES.

We add the following options to qt_deploy_runtime_dependencies, which
are then forwarded to file(GET_RUNTIME_DEPENDENCIES):
PRE_INCLUDE_REGEXES, PRE_EXCLUDE_REGEXES, POST_INCLUDE_REGEXES,
POST_EXCLUDE_REGEXES, and POST_INCLUDE_FILES.

Change-Id: I99a98fd91218abedda270609d0bafbb7f3e0feeb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-15 13:00:13 +02:00
Joerg Bornemann
5430fb2243 CMake: Set RPATH of deployed plugins on Linux
When deploying into some directory structure where CMAKE_INSTALL_LIBDIR
is different from Qt's lib dir, we need to set the RPATH of installed
plugins such that Qt libraries are found.

We do this using CMake's undocumented file(RPATH_SET) command and pray
that this command is safe to use across current and future CMake
versions.  For CMake versions < 3.21, we use patchelf, which must be
installed on the host system.

The adjustment of rpaths can be turned on explicitly by setting
QT_DEPLOY_FORCE_ADJUST_RPATHS to ON.

The usage of patchelf can be forced by setting QT_DEPLOY_USE_PATCHELF to
ON regardless of the CMake version.

Change-Id: I62ced496b4c12bf6d46735d2af7ff35130148acb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-15 13:00:04 +02:00
Joerg Bornemann
5ca714318c Don't set QT_PLUGIN_PATH in the deployment test's run environment
Otherwise we don't properly test whether the deployed executable can run
without adjusting the environment.

We temporarily adjust the test_widgets_app_deployment test and set
CMAKE_INSTALL_LIBDIR to make the test pass.  It would now fail on Linux
distros where CMAKE_INSTALL_LIBDIR defaults to "lib64" but Qt is built
with lib dir "lib".  The next commit removes this hack.

Change-Id: I63c79ef1ee23ffaeed881337fde6e9d889ecc0fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-15 12:59:59 +02:00
Thiago Macieira
1f7850cd46 QLibrary: merge duplicated setFileName{,AndVersion} code
The code was in triplicate. Once is enough.

Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171ce375892457fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-10-14 23:03:45 -07:00
Ahmad Samir
64e3f48e3b QDir: use QFileInfo::exists() directly
static QFile::exists() calls static QFileInfo::exists().

Mention QFileInfo::exists in the QDir docs details.

Change-Id: I35ba9b00f33376a4ceb2f27ab587d368a95e4fe5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-14 23:48:55 +02:00
Ahmad Samir
39bd9d45ba QTabBar: add note about hidding the close button
Drive-by change: improve another sentence.

Change-Id: Iaefa9d9eca95e1ce39e566e4b91ec9ed82410323
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-14 23:48:31 +02:00
Christian Ehrlicher
c3dccfef22 SQL/OCI: fix compilation
Fix compilation error introduced with
917b4d3802 and add a missing override

Pick-to: 6.4
Fixes: QTBUG-107544
Change-Id: I53571a0a113dc0f1e65f8773e66c02c1764739ee
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2022-10-14 20:34:44 +00:00
Tor Arne Vestbø
c017ef8bda Bump supported macOS SDK version for qmake to macOS 13
Pick-to: 6.2 6.4
Change-Id: I278af36b980ec4dacba7962c9f78655b536c21b2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-10-14 21:05:51 +02:00
Amir Masoud Abdol
d159767318 Clarify a Point for Building Locally on Apple Silicon
On Apple Silicon, Homebrew is installed under `/opt/homebrew` instead of
`/usr/local`, so I made a minor change clarifying this.

Change-Id: Ifccb51325339f80f8ed3c2a4f8acab485686af7e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-14 19:16:28 +02:00
Thiago Macieira
c849c48d19 Autotest/Unix: request zero-sized core dumps for crashing code
Unix systems have got crash loggers in the past 15-20 years, notably
macOS and Linux (abrtd, systemd-coredumpd, etc.). By setting the core
dump limit to zero, those tools should be mostly inhibited from running
and thus not interfere with the parent process' timeouts. Even for
systems without core dump loggers, disabling the writing of a core dump
to the filesystem should also help.

Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171d112d0671effe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-10-14 08:18:53 -07: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
bdd2b68696 tests: skip tst_selftests on Wayland and XWayland
QWindow::requestActivate() is not supported.

We have one tst_selftests binary, and will test it with both xcb and
wayland qpa plugin. A runtime check and skip will have different
restult files, which is not implemented in testlib yet.

Task-number: QTBUG-107578
Pick-to: 6.4 6.2
Change-Id: Idc8cb24c6f42a9f0f4dc9493e3fd1a5803ba7ce0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-10-14 17:18:53 +02:00
Liang Qi
f2aa04722a tests: skip tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() on Wayland
QWindow::requestActivate() is not supported.

Task-number: QTBUG-107158
Pick-to: 6.4 6.2
Change-Id: I047337d736ff10693d98075e2636028225162765
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
Mårten Nordheim
80762373ea Update QMutex-noexceptedness
Platforms where we use futex do not allocate.
Windows gained support in 6.2, but the noexcept macro was missed.

Amends 91f6460aff

Change-Id: I76da48fbaac5749fdec4ec76de6a0ff891b78442
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-14 17:18:52 +02:00
Maxime Roussin-Bélanger
f3bcf92216 Fix DBus cmake component name
If a user would copy paste the cmake line shown in the documentation
it would fail to find the package because it has the wrong case.

Change-Id: Ia5354cf408a5744bcb1c13f2624b10a6a1dbea4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-14 10:34:47 -04:00
Christian Ehrlicher
71f7a49fb2 SQL/OCI: add missing overide()
QOCIDriver::hasFeature() missed a 'override' which prevents compiling it
with '-Werror'

Pick-to: 6.2 6.4
Change-Id: I73a30134415947475e8f378fdb51bdd3f7fdd989
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-14 16:34:47 +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
Morten Sørvig
4df800d938 wasm: remove QWasmClipboard::m_isListener
Similar to isPaste (removed in previous commit), m_isListener
is set when handling external clipboard events, and is no
longer needed now that QWasmClipboard::setMimieData() is no
longer called for that case.

Change-Id: Ib44612e3bd1d59bac95b041ccffdd2ae97f5f879
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-10-14 14:34:47 +00:00
Morten Sørvig
87c3d2a3ce wasm: remove QWasmClipboard::isPaste
QWasmClipboard::setMimeData() was used to move clipboard data for
two different cases:

  1) On programatic QClipboard::setMimeData() call from application
  2) On paste event from the browser

However, we are free to not call it in case 2) above, which means
it can be used to handle programatic setMimeData() exclusively.

Change-Id: I5bb452538027ee8eab36be6e405ae416f350a08e
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-10-14 16:34:47 +02:00
Morten Sørvig
69033876c6 wasm: use standard clang optimization options
These were mostly identical. Use the base clang config
and then specialize for Emscripten in a separate section.

Behavior changes: QT_CFLAGS_OPTIMIZE_SIZE is now -Oz instead
of -Os. Emscripten does not allow -Og, replace that flag
with -O2 -g.

Change-Id: I08163551ad6b84377b99f287983cc1191521055c
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-10-14 11:17:32 +00:00