When IPv4 and IPv6 are supported by a server, QHttpNetworkConnection
will start up two connections and pick the network layer of the one
that finish first. In this case the channel with index 1 is used for
IPv6. When IPv6 wins, there is no channel at index 0. This situation
needs to be respected and we should try to use existing channels first
when there is a next request.
This is especially important when TLS session resumption is used.
Creating a new channel will cause to lose the ephemeralServerKey
used in the first connection.
Fixes: QTBUG-93295
Pick-to: 5.15 6.1
Change-Id: Ic9dc6a24ef793a29c2652ad37bc11120e2e6ceef
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The leak can be reproduced by running the test project from QTBUG-63557
with asan, although that report is about yet another leak.
[ChangeLog][gui][QRhiGles2] Fixed a memory leak in QRhiGles2
Task-number: QTBUG-63557
Pick-to: 6.1
Change-Id: Ic4d346abb36a5666feb3ceb881865b029f5a6945
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
from qt/qtx11extras 0e67fb41cfc4b4bfbaa7dc75f8ddebdf5a08e836.
The plan is to expose these as native interfaces, so this is a first
step.
Task-number: QTBUG-83251
Change-Id: Iecba8db9a4f616a08a3750ddaae08cc30ec66f89
Reviewed-by: Liang Qi <liang.qi@qt.io>
The fast-path can't antialias edges, and shouldn't be used when
that is requested.
Pick-to: 6.1 5.15
Change-Id: I3a0ce120ab96a6f95d11c165d1f5b356dae009fe
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QFuture already has a constructor from QFuture<T> to QFuture<void>. It's
safe to remove this function, since it couldn't be ever used: it tries
to access QFuture's private member, which leads to compilation error. It
was never documented or tested.
Change-Id: Iaed9602e2737455d159012ea18ca241954e1f7df
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This causes a build fail for androidextras, bring it back untill
the full refactoring to use qtbase APIs is done.
Change-Id: I3528c92d7c36818b105ae300ed1df9a7b281bb92
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Use paths configured with QT_ADDITIONAL_PACKAGES_PREFIX_PATH
to search also for the tool packages.
Task-number: QTBUG-93565
Pick-to: 6.1
Change-Id: I611b275dd7c4e7ecceb073d16643cd225bbb21d8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Useful to pass -V if the test command is 'ctest'.
Change-Id: I77193ff2c15d8df4de71730f66afc0ee87953384
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Sometimes projects don't follow the standard directory layout, so they
end up copy-pasting the guts of qt_build_repo and adapting that.
Split the macro into smaller ones so it's easier to reuse.
Change-Id: I8cc72ba2a2eaf58afd44950b3ac78378b7b1fdfd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
list(PREPEND) command was added in CMake 3.15+, but so far we claim
support for CMake 3.14 in user projects.
Use set command instead.
This is not the only place where we use list PREPEND in public API,
but it's the first immediate issue that comes up when using CMake
3.14.
Amends 963017f588
Pick-to: 6.1
Change-Id: I7ba4507fc7da2dc550317848751502b8b46c298c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We want standalone tests added by qt_internal_add_test to be built as
universal executables, so we can build them on an intel machine and
run them on an ARM machine.
But CMake build tests will be built on the final machine that runs the
tests and it might lack a universal SDK. That's why they should be
built only targeting the architecture of the machine they're running
on.
Change the generated qt.tooclhain.cmake file to allow opting in or out
of building projects with the same architectures as Qt was configured
with.
Now standalone tests will be multi-arch, but CMake build tests will be
single-arch.
Amends e379147f95
Task-number: QTBUG-85447
Task-number: QTBUG-87580
Task-number: QTBUG-92933
Change-Id: I41ab047983115f84eb2333cc9ac2d19ca08d621f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The machinery is not needed for all translation units, so keep it out
of qglobal.h.
Change-Id: Ib0459a3f7bc036f56b0810eb750d4641f567f1fe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The function ANativeWindow_fromSurface (as declared by
`$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/native_window_jni.h`
from version r22.b of the Android NDK) takes a `JNIEnv*` so `.jniEnv()` must be used.
This prevents the following compilation error:
```
error: no matching function for call to 'ANativeWindow_f
romSurface'
m_nativeWindow = ANativeWindow_fromSurface(env, m_androidSurfaceObject.object());
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/native_window_jni.h:45:16: note: candidate function not viable: no known conversion from 'QJniEnvironment' t
o 'JNIEnv *' (aka '_JNIEnv *') for 1st argument
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
^
1 error generated.
```
Pick-to: 6.1
Change-Id: I70d75cb7edc5875314fcb8a70d51d0ef40442101
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This also aligns the implementation with QWidgetItem::heightForWidth()
Fixes: QTBUG-92599
Pick-to: 5.15 6.1
Change-Id: I0de68c61ec37a16a8c338575d07ff9e8168a0b98
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
We end up excluding more than 65536 from 65536 of rowHeight.
Perhaps better fixed earlier, but I can't figure this logic out right
now.
Pick-to: 6.1 5.15
Change-Id: I5721c469441f15ac112180f971c857cd67edbf96
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
It has a problem with very small targets, and coordinates can't exceed
the same bounds we have on dimensions.
Pick-to: 6.1 5.15
Fixes: QTBUG-93475
Change-Id: If5b3af324f4e525cee3dc448ba41fdd8a91cc880
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The -developer-build had not the desired effect anymore.
That argument must not be hidden from the feature logic.
This amends commit d5c3e1336b.
Change-Id: I96562ea2df43ba7de002e705f28c7cc7edb4a589
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
To the option to users to use some needed APIs until we make them
ready as proper cross-platform public APIs.
Change-Id: I53006397463331ebae8314bf8a3a019474aec617
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This can be handy sometimes to avoid doing a env->GetObjectClass() call
to get the jclass object.
Change-Id: I015fe5ed73304338826e468e59778bcd3ceadc3b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Hiding the splash screen require one JNI call instead of having to keep
it as a global in qjnihelpers, and since it's not really easy to have a
cross platform way for it it makes sense to have it under
QNativeInterface. The alternative is probably removing it altogether
since it's not useful often.
Task-number: QTBUG-90500
Change-Id: I9b375c52afbf07e1ddd7957c1ec60af5c258f404
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove setNative{Activity,Service} and runOnUiThread functions
which are not used anywhere, probably left overs.
Change-Id: Ic7502dfd50d8eb4a9fa7abbe540a594a3614f14b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Most nested block elements are merged together, so while we shouldn't
do real inheritance we need to do it when block elements are combined.
Pick-to: 6.1
Fixes: QTBUG-91236
Change-Id: I9e37b15f705db92c79a620d0d772f25d0ee72b8d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
[ChangeLog][QtCore][QMetaMethod] It is now possible to query the
constness of a method with QMetaMethod::isConst.
Change-Id: I8a94480b8074ef5b30555aeccd64937c4c6d97d4
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Let -developer-build, -cmake-file-api set up the CMake File API query,
so that the build can be loaded directly into IDE's like Qt Creator.
[ChangeLog][Build System] configure -developer-build now sets up
the CMake File API query, so that a build can be loaded without
reconfiguration into Qt Creator and other IDE's. Pass
-developer-build -no-cmake-file-api to configure to disable this.
Fixes: QTBUG-89487
Change-Id: I69199b8f96da02e42e5610aa6f49881c1582f7da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The second parameter is the position of the first character not to be
returned when calling text(). So it needs to be passed the length of
the text, otherwise the last character is cut off.
Task-number: QTBUG-93494
Pick-to: 6.1 5.15 5.12
Change-Id: I7dd8324b3939220de125ba819b7b77588b21bd4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Also add a feature to the textedit example to set this value.
[ChangeLog][QtGui][CSS] The CSS text-decoration-color attribute is now
supported in rich text spans with underlines, overlines and strikethrough.
Fixes: QTBUG-82114
Task-number: QTBUG-39617
Change-Id: I0065cb5431833da55b0f503ce7ff2b83b74b718a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Skip drawing the focus ring if the widget has a custom styled
border, custom focus ring, or any rule that affects the border.
For QPushButton, if the style rule has a background
set, the bevel will be drawn in the Windows style.
Skip drawing the Mac focus frame in that case too.
Fixes: QTBUG-93032
Pick-to: 5.15 6.1
Change-Id: I7c4d4bf6f6ce7bbcd17cd620586c5efa44f2b8d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The 1 literal is an int, shifted by an int, and then passed into resize,
which takes a 64 bit value. This makes MSVC complain about
warning C4334: '<<': result of 32-bit shift implicitly converted to 64
bits (was 64-bit shift intended?)
Silence that warning by explicitly making the 1 a 64bit long long.
Change-Id: Ica354166de4adae20e05e176dc72b7ccd1af053f
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In some cases, the application may start before the window manager, and in some window managers
_NET_SUPPORTED may be changed. These situations will cause the _NET_SUPPORTED value obtained by Qt
to be inconsistent with the window manager.
Fixes: QTBUG-91396
Change-Id: I63c6934ad2538cdb9f05926b3748216bd0dcf04e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The libs and symlinks are in the same directory, no need
to have absolute paths.
Change-Id: I22dab933b1f3bdf244b0953c6bb7caaeedef5697
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It is deprecated so it shouldn't get mentioned by the ordinary docs.
Pick-to: 6.1
Change-Id: Ic867fd45396871245d6f5714f6a886c706e99c04
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
To not scare sanitizers and their users.
Change-Id: I51de5d6a5a358b3cf1355aeb6cc826a6ac021243
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We were not using the capitalization details from specialData in the
regular path of QTextEngine::itemize() causing it to be ignored.
Pick-to: 6.1 5.15
Fixes: QTBUG-90840
Change-Id: I7bb71fad4009f6d0685905a946c36ac1d24d8d3c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Otherwise the IM cannot correctly compose the input, making it impossible
to enter e.g. ü or ~ on certain keyboard layouts. Note that the native
macOS NSSecureTextField does not allow that either, which is however a
very bad user experience.
With this change, the modifier characters like ¨ diacritics will be visible
when entering them in either NoEcho or Password line edits. The follow-up
commit will remove those as well.
Fixes: QTBUG-84664
Change-Id: Ib4c5ab85634c17c407623f82b46c4849c72d9e69
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If the xcb-glx-plugin feature is not enabled we should not compile
classes and methods that use the GLX related code of the
QOffscreenIntegrationPlugin.
Pick-to: 6.1 6.0
Change-Id: I63eff9d0a2afc1bc1fa21ee1b49f854f13b94c93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
To keep the Android implementation details as concise and close as
possible.
Change-Id: I8452e29ec4fc4b0a0c5e1861e159e7aea88c17b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The androidSdkVersion() is probably the most used call from
QtAndroidPrivate, so instead of waiting long time for a cross platform
api that could offer this functionality, it's better to have it now
under the NativeInterface.
Task-number: QTBUG-90497
Change-Id: I008d4c77d347d36e0a7e8ca4d6f33f993b02511b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][QtNetwork][QLocalSocket] The waitFor*() functions on
Windows now support duplex operation, as they already did on Unix.
As a side effect, this restores the behavior that a single call to
waitForReadyRead() won't emit both readyRead() and disconnected(),
which also matches Unix behavior. The groundwork for that misbehavior
was laid by incorrect refactoring in d1a671b69 already, but at this
point it was harmless, as the pipe couldn't be newly closed after a
successful read. That changed with f265c87e0, which made the queuing
of signals async.
Change-Id: I1eb80e8f147bb58825143e0fe1e4300c59ae0fbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
QWindow receives keyboard originated context menu events, so it should
also receive events originating from a right-button mouse event.
Remove the incorrect statement about the special acceptance flag for
context menu events. There is no such thing, the event gets delievered
after the corresponding mouse press/release event.
Fixes: QTBUG-59988
Task-number: QTBUG-93486
Change-Id: I148310440604e74f600932cc1898fa152c483a61
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Warning was
qmetaobjectbuilder.cpp(1439): warning C4267: '+=': conversion from
'size_t' to 'int', possible loss of data
Instead of adding another cast in that line, fix the warning by making
the size variable a qsizetype, and remove the now unnecessary
static_cast to int.
Pick-to: 6.1
Change-Id: Ieff9330501f5a07c4bbe1e851a3ef211f8bf2d24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If a tab has a font assigned to it through a style sheet, then take the
font size into account when calculating the contents rectangle.
Add a test, which hardcodes the windows style to avoid flaky behavior
when e.g. macOS lays tabs out in the center.
Fixes: QTBUG-92988
Pick-to: 6.1
Change-Id: Ifb0ac97db7647cc25367972737be8878e50f6040
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The interface is already declared in qopenglcontext_platform.h,
so the inclusion in qcocoanativeinterface.mm was unintentional.
Change-Id: Ic6d4a86527d03787efd858c1a6568933be8a4327
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>