Commit Graph

58716 Commits

Author SHA1 Message Date
Alexey Edelev
7b9bb698b9 Add support of Android multi-ABI builds
This patchset adds the rules to utilize build artifacts from multiple
android abi builds and to use them for building and running tests.
If target.arch has the value 'Multi', coin will now skip building Qt
itself, since this means that all Qt versions were build previously.
It only builds test using the pre-built Qt for Android archives and
then runs the regular Android tests using multi-ABI apks. The rules
are implemented for qtbase only.

Change-Id: I265c70c45caa2155c75cd15c7e3a4f6a863252b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-04 18:39:03 +01:00
Samuel Mira
8d76c5af51 Android: Fix qfiledialog test for emulator bump to API 24
The qfiledialog test was failing on completer_data test. The fix
available for Android 11 also works in Android 7, so removed the if
clause.

Task-number: QTBUG-105377
Change-Id: I76a4c1073a754c9b299cfe731f42b80da1a6f8e2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-04 19:39:02 +02:00
Tor Arne Vestbø
e4147992df tst_QAccessibilityMac: Wait for accessible window to become available
It may take some time before the shown window is available through the
accessible hierarchy, so do an asynchronous test for that to happen.

Pick-to: 6.4
Change-Id: I3f312ae636505b805899973678b1bf10a65f96b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-04 16:51:38 +01:00
Tor Arne Vestbø
16b9f9a9aa Merge Objective-C++ parts of tst_QAccessibilityMac into main source file
There's no need to split it, we can use the -x compiler flag to build
the .cpp file as Objective-C++, or, as done here, just rename the file.

This allows us to use QVERIFY and friends, giving more precise failure reporting.

Pick-to: 6.4
Change-Id: I6fb1c4454335082c8a39010c5b75c59e6ec6561b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-11-04 16:51:37 +01:00
Eirik Aavitsland
7c4b3648ca Handle allocation failure in QImage rotate 90/180/270 functions
Fixes: QTBUG-108186
Pick-to: 6.4 6.2 5.15
Change-Id: I354e75d9f063cdea0340b84e9585a61651a7c70f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-11-04 15:50:10 +01:00
Paul Wicking
124d682739 Doc: Clean up qforeach docs
* Don't attempt to link to std::as_const with \sa.
* Don't say 'please'.
* Describe what is, never what may come to be at some
  undefined point in the future.
* Format text properly.

Change-Id: I496d98c143d693b3f09753f91f2fa5327bbb9402
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-11-04 15:50:10 +01:00
Volker Hilsheimer
46648436d4 Fix focus chain with compound widgets if created out of order
When a compound widget is created not directly before its children,
then another widget will be in the focus chain between the compound and
the compound's first child. If one of those children is then made the
focus proxy of the compound, then the widget in between becomes
unreachable by tabbing.

To fix this, detect that we set the focus proxy to be a descendent of
the compound widget, and then move the compound widget directly in front
of its first child in the focus chain. This way we can't have any gaps
in the focus chain.

Augment the test case with a corresponding scenario. As a drive-by, move
the debug helper up in the code so that it can be easier used, and set
object names on relevant widgets.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-89156
Change-Id: I17057719a90f59629087afbd1d2ca58c1aa1d8f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-11-04 15:04:42 +02:00
Mårten Nordheim
35e54f9b7b QNetworkInformation[Win]: Catch potential exceptions
Some Windows SDKs seem to throw an exception (sometimes?) when
calling ConnectionProfile::NetworkAdapter.
Catch the exception and ignore it, we would return Unknown anyway.
And just in case it is needed, do the same for GetConnectionCost.

This requires enabling exceptions for the plugin.

Fixes: QTBUG-108156
Pick-to: 6.4 6.4.1
Change-Id: Ie6c5adb3715578aa94ef3391afae79d9aecdc5d3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-04 11:54:31 +01:00
Ahmad Samir
7000e2dd5c QByteArray: add erase() unittests
Basic unitttest and one to verify erase returns iterator, not
const_iterator.

Change-Id: I44c3b82b4686ff3809648063376f5e36fb7e181d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-04 09:32:01 +02:00
Niclas Rosenvik
ded2fd9ff4 corelib: Support ELFOSABI_LINUX in qelfparser
ELFOSABI_LINUX is the old name for ELFOSABI_GNU
and some systems (NetBSD 9) with an old elf.h
still use that define instead of ELFOSABI_GNU.

Pick-to: 6.4 6.4.1
Change-Id: I3d18efe117ea21f13831df5293b4efce99694294
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-04 03:03:53 +01:00
Volker Hilsheimer
0bd46cc062 Fix spelling of converter
Primarily in the Cocoa clipboard code.

Change-Id: I39fede6144be5a0007a94e2ac2464892c958732f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-04 02:13:24 +01:00
Ahmad Samir
b8b675014f QString: don't detach in remove(QChar ch, Qt::CaseSensitivity cs)
- If the string isn't shared, don't call detach(), instead remove characters
  matching ch, and resize()
- If the string is shared, create a new string, and copy all characters
  except the ones that would be removed, see task for details

Update unittets so that calls to this overload of remove() test both code
paths (replace() calls remove(QChar, cs) internally).

Drive-by change: use QCOMPARE() instead of QTEST()

Task-number: QTBUG-106181
Change-Id: I1fa08cf29baac2560fca62861fc4a81967b54e92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-04 03:06:30 +02:00
Ahmad Samir
358b7a9e74 QByteArray: don't detach in remove()
- If this bytearray isn't shared call d->erase() as needed
- if it's shared, instead of detaching, create a new bytearray, and copy
  all characters except for the ones that would be removed

See task for details.

Adjust unittest to test both code paths.

Task-number: QTBUG-106182
Change-Id: I806e4d1707004345a2472e056905fbf675f765ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-04 03:06:29 +02:00
Liang Qi
71c3aab7ba xcb: Flush Display when processing xcb events
Only calling xcb_flush() is not enough when users use xlib calls
to paint with the Display, for example in QWidget::paintEvent(),
and not call XFlush().

This fixes a regression since Qt 4.x.

In Qt 4, we use XNextEvent() in x11 event dispatcher which
implicitly called XFlush(). In Qt 5 and 6, we use xcb calls.

See also https://www.x.org/releases/X11R7.5/doc/man/man3/XFlush.3.html

Most client applications need not use this function because the
output buffer is automatically flushed as needed by calls to
XPending, XNextEvent, and XWindowEvent.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-46681
Fixes: QTBUG-100085
Change-Id: I08dc0800ad0e23f0c2293d0d4e4bd29d92155752
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-11-03 21:43:57 +02:00
Liang Qi
be4d339ce7 xcb: Add xlib wrapper for XFlush()
Also avoid to include xlib headers directly.

Pick-to: 6.4 6.2 5.15
Change-Id: Id60a9b39a9d8284d5d0ab3df1ed61f844f1e68e4
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 21:43:56 +02:00
Volker Hilsheimer
d300a0fe76 Revert "Accessibility: don't emit focus change when reason is window activation"
This reverts commit 79a11470f3, which
resulted in QTBUG-105735. The new behavior is worse and affects multiple
screen readers, while the old issue is isolated to Windows Narrator and
could be considered a narrator bug.

Task-number: QTBUG-105735
Pick-to: 6.2 6.4
Change-Id: Ic8be1dbd592a3fdf2c3219ec4c5524bc2c7f0f6a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-11-03 18:47:38 +01:00
Volker Hilsheimer
83d5a6ee62 Clean-up: const'ify QMacInternalPasteboardMime API
Pass parameters as const-reference, and declare member functions as
const. They have no reason to modifty the converter itself, and
converters are expected to return the same result for identical input.

Task-number: QTBUG-93632
Change-Id: I19ef799c1aca956f2cd1aaea1d4f7ecb565fc017
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-03 17:29:08 +01:00
Volker Hilsheimer
8f3e24c17d Clean up QMacMimeRegistry: remove convertor
It's not called anywhere, we always get all convertors and iterate over
them to find the best match for the relevant context. Change those
loops to use ranged for.

Task-number: QTBUG-93632
Change-Id: Icb450ca56310a0acab881899234ac647792ce0c9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-03 17:29:08 +01:00
Volker Hilsheimer
3d6a89c5cc Clean up QMacInternalPasteboardMime: remove convertorName
The function was primarily called to generate debug output. The only
other usage was to identify the Rtf converter so that we can avoid that
we convert outgoing HTML to RTF. This is just as easily (and more
accurately) done by skipping any converter that converts HTML to RTF.

Task-number: QTBUG-93632
Change-Id: Ibe5bdece982399e2d9823f6df67393d1f81501fe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 17:29:08 +01:00
Volker Hilsheimer
d5300a6d2a Refactor: split QMacMime registry and virtual interface
The logic for registration of converter implementations is only used
internally through static functions. Move those, and related global
functions, to a QMacMimeRegistry namespace.

Reduce the QMacInternalPasteboardMime to the abstract interface for
converting between native and Qt clipboard data.

Historically, mime converters can have different "types"; make that API
type-safe.

Task-number: QTBUG-93632
Change-Id: I0e16fefa350398b693486199fe10357fd84abcd6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 17:29:08 +01:00
Volker Hilsheimer
c5d4de1557 Rename QWindowsMimeConverter to QWindowsMimeRegistry, rename files
The class registers converters and provides access to the converter
able to handle specific formats. But it is not a converter itself.

The converter would then be the implementation of the virtual
interface, e.g. QWindowsMime subclasses.

Task-number: QTBUG-93632
Change-Id: I150ef28e9bcead4291d72e0b0aa660be3fcd4a8a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 17:29:07 +01:00
Tor Arne Vestbø
971bd702ef Make QDialog respect Qt::AA_DontUseNativeDialogs
QDialogs can be backed by native dialog helpers, and the choice of
whether to use a particular helper is a runtime decision, made
in QDialog::setVisible() via QDialogPrivate::canBeNativeDialog().

As the native dialogs may not always provide every feature of the
corresponding Qt dialog, or if the user wants a uniform look and
feel for their application (even if that breaks the platform UX),
there is a way to opt out, via the Qt::AA_DontUseNativeDialogs
attribute.

This attribute was checked by subclasses of QDialog/QDialogPrivate,
for example QFileDialog or QColorDialog, but not by the base class
implementation, which is being used by e.g. QMessageBox.

Ideally we'd reduce the amount of code duplication in this area,
by having subclasses such as QFileDialog and QColorDialog call the
base class implementations, but for now we add a similar check for
the attribute to the base class as we have in other leaf classes.

[ChangeLog][Widgets] QMessageBox now respects the Qt::AA_DontUseNativeDialogs
application attribute to opt out of native message boxes on
platforms where this is supported (iOS, Android).

Change-Id: I0080441ea8764e9d5fc62d7f2d7b8914a5844c28
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-03 16:17:45 +01:00
Tor Arne Vestbø
d59ae19c49 macOS: Provide more details when failing to parse ICC profile data
Pick-to: 6.4
Task-number: QTBUG-108175
Change-Id: Ic9191a659ef1699701a26d90384285364eaef41b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-03 15:43:58 +01:00
Tor Arne Vestbø
b2b941823e Exercise QMessageBox::setInformativeText() in standard dialogs example
Change-Id: Id54a6d93e22fcb6622b434e3766baedb581d6b79
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-03 15:43:58 +01:00
Thiago Macieira
826dc56d3a QLocale: remove unwise early return in bytearrayTo(Uns)LongLong
Optimize the code for non-empty strings, which are the vast majority of
the conversions. Plus, qstrnto(u)ll operate just fine on empty strings.

This saves 4 instrctions per call on my laptop for any non-empty input,
and up to 4 cycles of execution.

Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17220b846a026b55
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-11-03 07:43:58 -07:00
Thiago Macieira
885ae61c63 QString: skip QLocale::numberToCLocale for C locale inputs
QString inputs are required to be in the C locale, so we can simply use
qt_to_latin1() in qstring.cpp to do the conversion from UTF-16 to US-
ASCII. There's no need to operate on QLocaleData.

Benchmark of QString::toInt() on "42"; before:
 152.8176 ns task-clock:u                     #    0.999 CPUs utilized
 425.904     cycles:u                         #    2.787 GHz
1550.992     instructions:u                   #    3.64  insn per cycle
 363.998     branches:u                       #    2.382 G/sec

Now, with a slightly optimized qt_to_latin1:
 19.3383 ns  task-clock
  54.005     cycles:u                         #    2.793 GHz
 238.000     instructions:u                   #    4.407 insn per cycle
  55.000     branches:u                       #    2.844 G/sec

And with AVX512 256-bit qt_to_latin1:
 20.6798 ns  task-clock
  57.748     cycles:u                         #    2.793 GHz
 237.000     instructions:u                   #    4.104 insn per cycle
  50.000     branches:u                       #    2.418 G/sec

For comparison, a QByteArray::toInt() on "42" produces:
 17.2310 ns  task-clock
  48.081     cycles:u                         #    2.790 GHz
 205.000     instructions:u                   #    4.264 insn per cycle
  49.000     branches:u                       #    2.844 G/sec

Fixes: QTBUG-107788
Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd1722042b9ccbacbf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-03 14:43:57 +00:00
Timur Pocheptsov
f0a7d74e1d Add permission API backend for macOS and iOS
When submitting applications to the iOS and macOS AppStore the
application goes through static analysis, which will trigger on
uses of various privacy protected APIs, unless the application
has a corresponding usage description for the permission in the
Info.plist file. This applies even if the application never
requests the given permission, but just links to a Qt library
that has the offending symbols or library dependencies.

To ensure that the application does not have to add usage
descriptions to their Info.plist for permissions they never
plan to use we split up the various permission implementations
into small static libraries that register with the Qt plugin
mechanism as permission backends. We can then inspect the
application's Info.plist at configure time and only add the
relevant static permission libraries.

Furthermore, since some permissions can be checked without any
usage description, we allow the implementation to be split up
into two separate translation units. By putting the request in
its own translation unit we can selectively include it during
linking by telling the linker to look for a special symbol.
This is useful for libraries such as Qt Multimedia who would
like to check the current permission status, but without
needing to request any permission of its own.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ic2a43e1a0c45a91df6101020639f473ffd9454cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 15:02:36 +01:00
Marc Mutz
1c6bf3e09e Port from container::count() and length() to size() - V5
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:

    const std::string o = "object";

    auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };

    auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
        auto exprOfDeclaredType = [&](auto decl) {
            return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
        };
        return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
    };

    auto renameMethod = [&] (ArrayRef<StringRef> classes,
                            StringRef from, StringRef to) {
        return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
                            callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
                        changeTo(cat(access(o, cat(to)), "()")),
                        cat("use '", to, "' instead of '", from, "'"));
    };

    renameMethod(<classes>, "count", "size");
    renameMethod(<classes>, "length", "size");

except that the on() matcher has been replaced by one that doesn't
ignoreParens().

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

Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache,
to avoid porting calls that explicitly test count().

Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-03 14:59:24 +01:00
Morten Sørvig
43cda7807b wasm: disable asyncify
Emscripten does not support EM_JS from side modules

Change-Id: I9c29d112fc0a5ab7830e1cadd0af77829c69d0a9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-11-03 12:22:51 +00:00
Morten Sørvig
ef3aaa5edd wasm: include what you use
Change-Id: I0b35ca09314b8708de9ed811328ad1de8717f50d
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
2022-11-03 12:22:51 +00:00
Ahmad Samir
ed7e57973a QString: refactor remove(QChar, Qt::CaseSensitivity)
Change-Id: I0e38e9fd00d81aea6e779012beabdfb29695bd43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-03 14:22:51 +02:00
Ahmad Samir
f41089ba3d QString: don't detach in remove(pos, len)
- If this string isn't shared, don't call detach, instead use ->erase() as
  needed
- If this string is shared, create a new string, and copy all elements
  except the ones that would be removed, see task for details

Update unittest to test both code paths.

Task-number: QTBUG-106181
Change-Id: I4c73ff17a6fa89ddcf6966f9c5bf789753f6d39e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-03 14:22:51 +02:00
Ahmad Samir
dcfab7e28e QString, QByteArray: add erase(iterator) method
Fixes: QTBUG-106182
Change-Id: Idc74cc643b90252838ca1a9ca40a330315da421f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-03 14:22:51 +02:00
Morten Sørvig
2ab347b0dd wasm: add support for enabling wasm excptions
Add support for enabling -fwasm-exceptions at compile and
link time, which enables use of C++ exceptions.

Wasm-exceptions is an in-progress roadmap item (see
https://webassembly.org/roadmap/), but is supported
by the major browsers

Change-Id: I6e2847206a46ed8038320c99725bc09a0344d1b4
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-11-03 12:22:50 +00:00
Alexey Edelev
b813a5b120 Remove the special handling of the qml directory when parsing xml deps
The 'qml-root-path' option is not mandatory to have value when using
CMake, even if Qml/Quick is used in the project. This happens when
the project doesn't use .qml files. In this case the 'qml' directory
from Qt6Quick_<abi>-android-dependencies.xml is treated as a normal
folder for scanning and androiddeployqt deploys all the QML plugins
with their dependencies.

It looks like the 'qml' directory was added to bundled file in times
when qmlimportscanner was not implemented, so the need of its use is
redundant. This removes both adding the 'qml' directory as the bundled
dependency and the special case that avoids its scanning. This fix is
applicable for both CMake and qmake.

Amends 54c959643e

Task-number: QTBUG-106035
Task-number: QTBUG-107589
Change-Id: Idd55617b8ca8ab1d210cce737548ee486ea94986
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-03 09:16:42 +01:00
Alexey Edelev
769a28242e androiddeployqt: Add the missing return value check
The check doesn't affect the flow, since the same check fails the
androiddeployqt execution later, when resolving all elf dependencies.
Skipping the dependency from xml at earlier stage will allow to continue
deployment procedure, without the missing plugins and their dependencies.

Amends 54c959643e

Task-number: QTBUG-106035
Task-number: QTBUG-107589
Change-Id: Ic3d38e05f8ad283244c87858fee29d1035a0da15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-03 09:16:04 +01:00
Alexey Edelev
7c1270ea76 Handle the QT_SKIP_WARNINGS_ARE_ERRORS property when running syncqt
When creating the syncqt custom target we only check if the
WARNINGS_ARE_ERRORS variable is set. But the warnings-are-errors
feature can be disabled using the QT_SKIP_WARNINGS_ARE_ERRORS
target property. Add the genex condition to opt out the
'-warningsAreErrors' argument using the QT_SKIP_WARNINGS_ARE_ERRORS
property.

Change-Id: I8e6f89453500335c2b31e6e69c65b351c79dddc2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-03 09:15:33 +01:00
Yuhang Zhao
17b542c2d2 D3D11Rhi: change default swap effect to FLIP_DISCARD
The original comments are misreading Microsoft documents. It seems
Microsoft uses FLIP_SEQUENTIAL to refer to the flip model, not just
FLIP_SEQUENTIAL itself. And according to my experiments, DXGI_SCALING_NONE
can be used with FLIP_DISCARD indeed. The swap chain can be created
successfully and I didn't get any failed HRESULTs. So there's no need
to use FLIP_SEQUENTIAL as the default swap effect anymore. Let's change
it back to FLIP_DISCARD.

Change-Id: I6001e2070d3ff00268299e81f6a310394e62c464
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-11-03 12:03:29 +08:00
U-GER\tjmaciei
3a8980304f qsimd.h: add two more CPU feature macros that MSVC doesn't define
Ivy Bridge added RDRAND and Haswell (x86-64-v3) added MOVBE.

Pick-to: 6.4
Change-Id: I3d74c753055744deb8acfffd1723e5b9bdfaaafb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-11-02 19:49:23 -07:00
Alexandru Croitor
c2aa05991d CMake: Fix qt_add_resources missing dependency regression
Adding target dependencies instead of file dependencies to the
qrc processing custom command broke regeneration of the qrc
file when translation source files were touched, as well as caused
flaky build failures.

Originally, the target dependencies were added to work around an
issue with the Xcode generator (a custom command needing a
common target).

Limit the usage of target dependencies 'approach' to the Xcode
generator only.
This fixes the regression for non-Xcode generators, but will still
cause issues for iOS + Xcode.
A proper fix for Xcode will need more research.

Amends 5b0e765ab0dddba86662925cb44aeac748a286b7 in qttools
Amends cfd5485d41

Pick-to: 6.4 6.4.1
Fixes: QTBUG-107687
Fixes: QTBUG-108113
Task-number: QTBUG-103470
Change-Id: Ibddd05726deba2103c9c3c85a3fefd6d55798020
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-11-02 22:07:24 +01:00
Alexandru Croitor
83ecb65ec0 CMake: Propagate usage of WARNINGS_ARE_ERRORS when building repos
When configuring a qtbase developer build, WARNINGS_ARE_ERRORS is
set to ON and -Werror flags are added to the PlatformInternal
targets. But the value of WARNINGS_ARE_ERRORS is not exported.

This means that CMake code can't make decisions based on that variable
when building other repos, and we now have such code with the new
syncqt.cpp in qt_internal_target_sync_headers.

Export the value of WARNINGS_ARE_ERRORS in
QtBuildInternalsExtra.cmake.in.

Fixes: QTBUG-108151
Change-Id: I5de2633fcb1f20fead7d436c201852424e726842
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-11-02 20:50:43 +01:00
Mårten Nordheim
4d3f5ac0cc QHostAddress: Fix incorrect comparison against 'Any'
When 'this' is IPv6 and 'other' is Any then there is no point in testing
'other's IPv6 address.

Added extra tests against QHostAddress::Any*.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-108103
Change-Id: I09f32b1b147b1ec8380546c91cd89684a6bebe2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-02 19:46:19 +01:00
Mikolaj Boc
899e540d46 Use offsetX/offsetY for pointer events
qtwasmcompositor expects coordinates relative to the canvas. Provide
that by using pointer events' offsetX/offsetY instead of the viewport
x/y.

Fixes: QTBUG-108128
Fixes: QTBUG-106031
Pick-to: 6.4 6.4.1
Change-Id: I76c553b7b7e350fd873b18c775848217a4905f3d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-02 16:21:28 +00:00
Marc Mutz
8acec4dbe6 Long live QUtf8::convertFromLatin1()!
With the introduction of QAnyStringView, overloading based on UTF-8
and Latin-1 is becoming more common. Often, the two overloads can
share the processing backend, because we're only interested in the
US-ASCII subset of each.

But if they can't, we need a faster way to convert L1 into UTF-8 than
going via UTF-16. This is where the new private API comes in.

Eventually, we should have the converse operation, too, to complete
the set of direct conversions between the possible three
QAnyStringView encodings L1/U8/U16, but this direction is easier to
code (there are no error cases) and more immediately useful, so
provide L1->U8 alone for now.

Change-Id: I3f7e1a9c89979d0eb604cb9e42dedf3d514fca2c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-02 17:21:28 +01:00
Kai Köhne
3834fee3d3 Doc: Normalize page names
qdoc does enforce lowercase file names for .html pages, and also
replaces underscore with a dash. Make sure that the original \page name
already is normalized, so that it's easier to search.

This was done by
  find . -name "*.qdoc" -exec perl -p -i -E "s/\\\page (.*)/\\\page \L\1/ && s/_/-/g" {} ;

Pick-to: 6.4
Change-Id: Ib50b85af8ffd985edf06856266eefdebf8b328a3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-11-02 17:21:28 +01:00
Niclas Rosenvik
265b1369a3 Fix redefine of QT_NO_VERSION_TAGGING warnings
If a user requests no version tagging by
defining QT_NO_VERSION_TAGGING a lot of
redefine warnings will be output from the
compiler when building corelib.
So only define QT_NO_VERSION_TAGGING if it
is not already defined.

Pick-to: 6.4
Change-Id: I56609b3589184bda7bec52d168d9fd11e2f14a2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-02 16:40:25 +01:00
Ahmad Samir
8e93099349 QFileSystemMetaData: initialize integral members in-class
Safer, this way ensures we don't have undefined behavior if one of those
members is returned from a method before being initialized.

Change-Id: I30da1837cea960d43b55259a3906d1aecbf722f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-02 14:41:43 +02:00
Ville Voutilainen
b82c5f9b7f Android: Fix signing of APKs that are generated when an AAB is also built
To simplify matters, this removes the support for signing APKs with
just jarsigner. apksigner is always used for APKs, and jarsigner is
used for AABs. I consider that to be just fine, you _have_ to start
using apksigner eventually, and the time for that is long past.

Pick-to: 6.4 6.2 5.15
Task-number: QTBUG-91255
Change-Id: I211ae796db0f2619265deb1f30ab3cc5d1ecfbc9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-02 13:32:37 +02:00
Mårten Nordheim
528b03d6b6 QSsl[OpenSSL/Android]: Fix hardcoded 1_1 suffix
Since we support 3 as well now we should not always use 1_1.
The suffix will change depending on which OpenSSL version was used when
Qt was built.
This only affects Android.

Pick-to: 6.4 6.2 5.15
Change-Id: I2e443b12daa5e79190f1b3367e21ba0fa6a1dcd4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-02 12:06:27 +01:00
Heikki Halmet
c45cb7f0cc BLACKLIST: tst_QApplication::sendEventsOnProcessEvents for RHEL 9.0
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-87137
Change-Id: I47d7465efe61a74fd2ae3b377442ca74984344de
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-11-02 07:05:05 +00:00