For Windows. Based on the code I wrote for QNetworkStatusMonitor.
It also renames the netlistmgr feature, avoiding the abbreviation.
Locally my MinGW fails the networklistmanager feature test so it may
not be supported on MinGW, likely leaving it without a backend at all.
Change-Id: I13bbe4127edc2a9c0bb91602c95f1cb206a85a69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change the setSelectionOnFocusObject() to take geometry
arguments in native pixels, in order to be consistent with
other QPlatformInputContext API.
Calling code which pass non-native geometry must be updated
(in practice only the Android platform plugin).
Change-Id: I1c61b8cf583afe607567d6056ca7ff23cc3de3f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This field has been defined since API level 11, so no reason why we
shouldn't just use that instead.
Pick-to: 6.0
Change-Id: I8e3ffde3680e41f26d776e1f0474f632186a6b27
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
If ImhHiddenText is set then that should take precedence over the
other input method hints. Also, certain combinations aren't really
possible. E.g., ImhEmailCharactersOnly and ImhHiddenText doesn't have
its own specific variation on Android.
ImhSensitiveData and ImhNoPredictiveText are also likely to not work
as TYPE_TEXT_FLAG_NO_SUGGESTIONS is normally ignored by Android
keyboards. A common workaround is to use the visible password variation
but since this will force the layout to use latin characters it's not
something we can use as an universal workaround, so users will need to
manually enable it through the environment variable
QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT
Fixes: QTBUG-85787
Pick-to: 6.0 5.15
Change-Id: I0ff591ec9acf8dd556c7987e6d997cff3ddfe38e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
registerNativeMethods() should be using the local jclass from
findClass() instead of the global reference.
Task-number: QTBUG-89633
Change-Id: I469a9a1ecff95ab9948421baa5c88735ba7ad776
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Always try segments from 64k to 128k pixels, this matches
qimagescale logic, and gives a one percent speedup locally.
Change-Id: I3ef468eac9dca4b84f04850e970f3d15a4f16255
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This enables support for QT_SCALE_FACTOR on iOS.
Fixes: QTBUG-74978
Change-Id: Ibcf0741c178e44802065e472e096a5f4c7d6f3cf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Passing nullptr to QHighDpi::toNativePixels() is seldom
correct, and will work only on the main screen.
Instead, call frameMargins() on the platform window
(instead of on the QWindow) and get the margins directly
in native pixels.
Pick-to: 5.15
Fixes: QTBUG-90716
Change-Id: Id7b31ec3246010c367781b64ed832c589bbaeb0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Also remove tests/tests.pro that would be empty without the benchmarks.
Change-Id: Iaf92a729d1286b3e0c03bf9f877b59e1d83708e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some of the listed source files are already included and must not be
compiled.
Pick-to: 6.0
Fixes: QTBUG-90777
Change-Id: I80b4ca6a50b882445aca513d800ef8375070d786
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Do not use the startSystemResize() functionality in that case.
Fixes: QTBUG-90628
Fixes: QTBUG-73011
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I8d4843c1715c7f75f9b41c904e6f1aebbf0e02d7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
While rebasing and resolving conflicts, I've acidentally removed a
declaration of supportsTls13() making a call expression invalid.
Change-Id: If561091db36f0354b61fa050ff9f72b29eddce53
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Currently the platform plugins use the public QInputMethod
API when querying geometry. However, QInputMethod returns
geometry in device independent pixels, while the platform
plugins require geometry in native pixels.
Add new API to QPlatformInputContext which returns input
geometry in the native window coordinate system:
QRectF inputItemRectangle()
QRectF inputItemClipRectangle()
QRectF cursorRectangle()
QRectF anchorRectangle()
QRectF keyboardRectangle()
These make the relevant QHighDpi calls internally, and
such calls can then be moved out of the platform plugins.
Disambiguate inputItemRectangle() in qandroidinputcontext.cpp
by renaming it to screenInputItemRectangle().
Change-Id: I561745b64fb197d64e3dfddcf0751528bb8d0605
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
- Add links to new topics
- Remove links to obsolete topics
- Update changed topic titles (might break links in module docs)
- Fix HTML file name of the Creating a Mobile Application topic
Change-Id: I8f06171946d85ed0fbfd457ed115f41cb5a9e2d0
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Dating from the origins of our support for the zoneinfo file format,
the mapping of POSIX's day-numbering (0 = Sunday through 6 = Saturday,
see [*]) to Qt's (1 = Monday through 7 = Sunday) was done by mapping 0
to 1, when it should have been 7.
[*] http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
Corrected a QTimeZone test that trusted the results it got without
checking which day of the week those were: they were all Mondays.
Verified that the corrected dates are in fact Sundays.
Checked the zone abbreviations, too.
Fixes: QTBUG-90553
Pick-to: 6.0 5.15
Change-Id: I84b4b14f9892ff687918cd3c42c7c9807e45313c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
As we call operator new on create(), we also need to delete on
destroy(). Otherwise we leak memory.
Change-Id: Ib80fe96c4173cba6fa474d3c81d88fe603d1ded2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In order for other Qt modules to be able to reliably use this property,
it needs to be defined under all supported scenarios. Previously, it
would only have been defined for a per-repo build and not for a top
level superbuild. The only place it was being set was in the
Qt6CoreConfigExtras.cmake file and only when QT_NO_CREATE_TARGETS was
false (so it wouldn't be defined for examples even in a per-repo build).
It was also noticed that INTERFACE_QT_MAJOR_VERSION was also being
handled in Qt6CoreConfigExtras.cmake, but this was not needed. This was
already being done as part of a call to qt_autogen_tools_initial_setup()
which occurs inside qt_internal_add_module().
Fixes: QTBUG-90617
Change-Id: I589316ffb8138bd2df8a1d49fdd6335d2e2836f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Bug: If you do a press and hold on a line edit, the edit menu
will show to let you select a word etc. If you now do
another press and hold to bring back the magnifier glass,
the edit menu will stay open while you move the magnifier glass.
This patch will ensure that we always hide the edit menu when
we show the magnifier. There is never a case where both of
them should show at the same time. By hiding the menu from
the place where we show the magnifier means that we can
remove code from the QIOSSelectionRecognizer that used
to do this for one of the cases from before.
Pick-to: 6.0 5.15
Fixes: QTBUG-90743
Change-Id: If2a92f94422c730c2b223129d96f5bc3bf3deeee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
With gcc 10.2, I cannot compile qtbase without this patch.
Pick-to: 6.0 5.15
Change-Id: I5be48947e2301d5befeec397291c0da597f7eb63
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
which will become parts of TLS plugins in the future.
Task-number: QTBUG-65922
Change-Id: I4ee3c59c435fc34a9f4dacd3ff0e3cfb44251e23
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Remove 'corewlan' feature from the network related configure.json.
The 'bearer' component was removed in the Network module. It was
the only consumer of the 'corewlan' feature. There are no
plans, yet, to use CoreWLAN framework in the future.
Pick-to: 6.0
Fixes: QTBUG-90672
Change-Id: I1afb7b04ea75f8cb09cb570d820d16f54a130cf9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Private PCRE2-specific definitions should be only used with the
built-in PCRE2 library.
Ammends 7c69eb8868
Fixes: QTBUG-90556
Change-Id: If47e0b9eaaece290676d6c2b484bb52281aa7c68
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The QT_BUILD_QMAKE_BOOTSTRAP and QT_BUILD_QMAKE_LIBRARY definitions
are never defined in the project since migrating to CMake build.
Change-Id: I7108c92387005a2fde6ebdb2d74843e3efc6413e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Turned our local diffs into a side-branch in the upstream repo, got
material changes upstreamed (leaving only our #include changes),
rebased it to master, copied back to our version. Upstream has made no
new release since 3.1.5 in 2019 May, but there is substantial change
since then, including acceptance of our upstreaming. Our patches have
been refined in the process of upstreaming.
The list of source files is slightly changed. The double-conversion.*
files are split in two, string-to-double.* and double-to-string.*, but
the old double-conversion.h header is retained, simply pulling in its
two halves. These thus need to be present in the include directory.
Changed the patches/ directory to be in git format-patch form, for
sending or applying to the upstream repo, before copying files into
the qtbase source tree. This should make future upstreaming easier.
Task-number: QTBUG-90214
Change-Id: Id94198f58ef7bdf02af117c35cb9678b5c34ac0e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Rather than the other way around, in preparation for deprecation.
Change-Id: I001d7617425a24e960871925130c5314c393ea8c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Member variables have been reordered to reduce the memory
footprint by 8 bytes.
Change-Id: Ib03f916c065861fa317f8802695363fd152e314a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Introduction of QObjectCompatProperty requires every write to
the property to be examined whether it is OK or should be replaced
by a setValueBypassingBindings/markDirty combination. The existence
of operator= make this difficult as it is easy to miss places where
it is written. By not having operator=, we can help developers
make sure they had a conscious decision about each write to the
property.
Change-Id: Ia61ea4722eb0bab26ce7684b85dd03d710cd1751
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When a modal window is WindowModal then it is possible for another top
level window to be active and therefore the menus shown may be valid
for the window. So we can still allow the menu items to be validated in
the context of that window.
Fixes: QTBUG-74088
Pick-to: 6.0 5.15
Change-Id: Ifb9c3fe12654b2972e0e3c368dc093fae1ed4cc8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It is quite common for a socket notifier to be disabled in a slot
connected to its activated() signal. But the event dispatcher did not
update the position in the list of registered notifiers, which caused
the next notifier to be omitted. Of course, on the next iteration of
the event loop, the omitted notifier would fire again, but this reduced
the scalability of applications that use a large number of sockets.
To solve the problem, we update the current position in the list when
a notifier becomes unregistered.
Change-Id: I6565bf23500d9e38ce84b34784d89d227fa166e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 8f8405e046.
Reason for revert: Appears not entirely thread-safe and caused QTBUG-90705
Change-Id: I390c0b1a555a18e6a095b52010371d017071e26b
Fixes: QTBUG-90705
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
When the QDial should be painted with an offset, the dial was not draw
correct.
Fixes: QTBUG-89574
Change-Id: I646c3d42fba34e8c603a8f81f363ed827f04d5de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Currently there is no visual feedback where the section move will end
up. Therefore mark the drop section to show where the dragged section
will be inserted.
Fixes: QTBUG-673
Fixes: QTBUG-1114
Change-Id: I3e45a9a9c0604342bb0286fc7cd4c89c757c28cd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When using static OpenSSL, HAVE_openssl test will fail, because of
unresolved external symbols. These symbols are from Ws2_32.lib and
Crypt32.lib, which CMake does not link by default. In qmake build
system, we can use OPENSSL_LIBS variable to specify these system
libraries. But there is no similar variable in CMake build system.
Accordingly, we should let OpenSSL::Crypto target link these libraries.
Upstream issue:
https://gitlab.kitware.com/cmake/cmake/-/issues/19263
Pick-to: 6.0
Change-Id: I5f27790b251d0a0f71aaf2aed2b933aeb3326f1f
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
There is no reason for QVariant to go through QMetaType when it can use
the QMetaTypeInterface directly. Without LTO, the QMetaType method calls
are opaque, and we therefore risk to lose optimizations.
Additionally, avoid constructing a QMetaType from a type id if we
already have the QMetaType.
Fixes: QTBUG-90673
Change-Id: I7069ff6aff70d5baecdf5cf5760014c3dda81784
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is in line with QML where
import QtQuick 2.15
Rectangle {
width: 100
height: 100
color: "red"
Rectangle {
id: inner
x: 10
y: x
width: 50
height: 50
onYChanged: { console.log("hey"); inner.x = 10}
TapHandler {
onTapped: inner.x = 20
}
}
}
results in a binding loop warning when the tap handler triggers. While
the change handler would only run once, we cannot statically determine
if we need to loop once, twice, or if there actually is a diverging
loop. Thus we unconditionally warn about the binding loop and stop
executing the binding.
As a drive-by, verify in the related test that a change handler which
overwrites its properties binding itself removes the binding.
Change-Id: I5372019c2389ab724c49cd7489ecbd3ebced1c69
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
So far, all documentation about bindable properties was in the
corresponding classes QProperty and QObjectBindableProperty.
This patch creates one documentation page for a general
introduction to bindable properties and information
concerning all of those classes.
Change-Id: Ib718dbeb385c3899fb34cc2ce03bec7a8d43a034
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
There are two methods which set the interval and do things
afterwards. Setting the interval might trigger other code. This
patch uses setValueBypassingBindings and marks the interval dirty
later, just to be safe.
Change-Id: I2cae3e4a9f040007dfd246c424250034e8df10a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QTlsBackend is a factory itself - it creates TLS/X509 objects. Having
an intermediary between Factory->Backend->TLS primitive does not look
very natural thus let's squash the first two parts. Backend is a factory
creating TLS primitives, but its static functions also provide information
about backends availablei and give access to those backends.
Fixes: QTBUG-90606
Task-number: QTBUG-65922
Change-Id: I8409d81fd11fb46e6ab4465b4937a7680a8c2447
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
fix QLineEdit Cursor Rect and InputMask area overlapping,
the cursor rect area is white. when inputMask is set,we don't
need draw cursor.
Fixes: QTBUG-89578
Pick-to: 5.15 6.0
Change-Id: Ibec7f8f1f7331a12438fd821c2002903260da10a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
With the updated QEMU and toolchain, these tests now pass.
Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>