For modules that are not yet ported to CMake and that use
QMAKE_USE += libfoo
we need to provide the information about libfoo in the qt_lib_XXX.pri
files.
Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs.
Task-number: QTBUG-75666
Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The addition of Negotiate to QAuthenticator caused a soft sort of
regression in environments where there is key distribution center
set up. This was due to how QAuthenticator works in that it will
simply prefer the latest entry in the enum, which now was Negotiate,
which sadly wasn't really a valid option in that situation. And it is
not smart enough to fall back and try another method.
To work around this issue we re-order the enum to prioritize
authentication methods to restore previous behavior.
Note that Negotiate is still preferred over Basic and None because
they're not likely to appear together.
Pick-to: 5.15
Task-number: QTBUG-83905
Change-Id: Ic528318b6b711aa04d42a86c684452bb6ebde112
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The path returned by dladdr seems to be encoded with the current
locale encoding which means that if it contains unicode characters, the
fromLatin1() call mangles the path, and QFile::exists reports that
the path does not exist.
To preserve non-ASCII characters use fromLocal8Bit() instead.
This should fix the runtime issue of finding the Qt prefix when the
Qt library path has non-ASCII characters.
Amends 2f52afda8e.
Amends 4ac872639e.
Fixes: QTBUG-84272
Task-number: QTBUG-15234
Pick-to: 5.14 5.15
Change-Id: I37019ed219cf2cf7d9663cb1e16acdb97b3bdf09
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If we configure qtbase with Ninja Multi-Config, we should use the same
generator when building other repositories as well, to ensure that
all repositories have the same set of configurations (debug and
release). To do that, the Coin instructions will call the
qt-cmake-private wrapper which records the generator used.
For standalone tests continue to use qt-cmake, so that only a single
configuration is built (no need to build tests in both debug and
release mode). The configuration built will be the first one from
the initial list with which qtbase was configured (usually
RelWithDebiInfo). This is ensured by the
QtBuildInternalsExtraConfig.cmake file.
Task-number: QTBUG-80900
Change-Id: I701b2f652a22d51e640a6fdf19c3b2d2dfb34d5c
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Calling cmake --install . only installs a single configuration.
To install both debug and release artifacts, the install
invocation needs to be done for each configuration.
To keep the Coin instruction code simpler, delegate the looping
over configurations to a custom CMake script, and use it in the
Coin instructions.
Replace all cmake --install calls in the instructions with calls
to either call_host_install.yaml or call_target_install.yaml.
The path to the script depends on whether we are building
qtbase or another module. In the former case the script should
be called from the build dir, otherwise from the install dir.
The other distinction is whether the host or target env prefix
needs to be added.
Task-number: QTBUG-80900
Change-Id: Ied4bf739e2b1a2307f22fc79c1cfad746c8cbc44
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When using Ninja Multi-Config, we don't want to install a "Release"
moc.exe, and then override it with a "Debug" moc.exe.
Because it doesn't seem possible to exclude installation of targets
per configuration, put the non-main configuration tools into
configuration specific subfolders like "bin/Debug", so no overriding
happens upon installation.
Introduce a new function qt_get_install_target_default_args() which
returns install destination arguments for consumption in qt_install()
calls. The function adds the config-specific suffix to the destination
for the appropriate configs.
Each call to qt_install *adds* new rules for installation,
which means that export registration needs to happen only on the first
call.
Make sure qt_add_tool doesn't ask qt_add_executable to install
yet again, to create duplicate rules.
Apply the same install arguments logic to qt_add_executable calls.
Task-number: QTBUG-80900
Task-number: QTBUG-80901
Change-Id: I3e732d27dba5bf5f8059d2878ef1e425237d383a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Thus we will build both Release and Debug configurations in Coin
when cmake --build . is executed, mimicking qmake's make which
builds both configurations in debug_and_release.
Task-number: QTBUG-80900
Change-Id: If48aca249eb84e690d3f9d51a733b3a25df1f7ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Where NMC is the CMake Ninja Multi-Config generator.
The first use case is to allow building standalone tests with one
configuration even if Qt was build with multiple configurations.
Another use case is for regular Qt consumers that might use the
generated qt-cmake shell script which does not have the generator
specified (as opposed to qt-cmake-private).
Another detail is to use the first configuration from the initial
Qt configurations list (CMAKE_CONFIGURATION_TYPES) when building
standalone tests with a single config generator, so that it doesn't
default to Debug, but rather to the provided first configuration.
This matches qmake behavior, where on Windows with a
debug_and_release configuration, tests are still built against
release.
Task-number: QTBUG-80900
Change-Id: I0da91c1f91095332cfe9e38d17f440aad6a09d15
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This includes allocating QString data as char16_t instead of ushort.
This isn't the end of the port, but an important milestone: the
traditional foldChar() functions are now all unused.
Change-Id: I766bebc2d70b6972e2045d3474c7f5770f4676d9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since changing the window flags can make it frameless or have a frame
then it should ensure that the hasFrame setting is updated accordingly
when the window flags do.
Change-Id: I7bf4995d7967623b117426d8750e63fa97967e2c
Pick-to: 5.15
Pick-to: 5.12
Fixes: QTBUG-84029
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Ensures it stays crisp also when using fractional scaling.
Change-Id: I4a319929bca0e2dc4810c2c07d06f98b7f4e10b4
Pick-to: 5.15
Reviewed-by: Liang Qi <liang.qi@qt.io>
If user's specified to build without examples we shouldn't silently
overwrite this. This might mean that some tests will fail to run then,
though.
Fixes: QTBUG-84087
Pick-to: 5.15
Change-Id: I53748fc03354ffdf015f85c93efc6e86c446adb8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add special case for using correct module name.
Change-Id: Icfd88eccfa8adf55a69091d86a01bd1658fe2b54
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fix the check of the return value of GetClassInfo() to detect
a clash when mixing libraries with identical Qt namespaces.
Pick-to: 5.15
Fixes: QTBUG-84005
Change-Id: I2d13b909a85dae947c65551b7e390334c83d2e2a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Cleanup the code in qUncompress and make use of QArrayDataPointer
to keep track of memory.
Change-Id: I2c11f0468813698d2b7c25acd0f8786a289739a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move it into the function, give it an explicit size and make it
iterable and indicate to QStringView that it's a compatible container.
Change-Id: I483d9225ac73ad93f2037489f2d32473c377e8b7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Set the target property INTERFACE_MODULE_IS_HEADER_ONLY for
header-only modules, and only create *Depends header files if this
property is falsy.
Change-Id: Ic6b100787d18b3ff1f7b9d0f2b5c744018b1f295
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QParsedNumber will need it, as do some others, like QAngle.
Change-Id: Iee09f498d2cdbb28d43b94301328ec7858661ad2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Added QFuture::onCanceled() method, for attaching handlers to be called
when the QFuture gets canceled.
Change-Id: I1f01647d6173ba0c1db6641e14140108b33ac7c4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Introduced QtFuture::connect(sender, signal) function returning a
QFuture object, which is resolved when the signal is emitted.
Task-number: QTBUG-81589
Change-Id: Idbe301eb247b468b9b34f3470c3359d6a7af2f3a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
A recent change in IBus made it prefer the WAYLAND_DISPLAY envvar in
order to compose its socket path for Wayland sessions. This is because
DISPLAY is unreliable in those environment: It might not be there, there
might be several displays pointing to the same Xwayland server (as it's
the case in GNOME 3.36), or there might even be multiple Xwayland servers
(eg. to enforce inter-app isolation with X11 apps).
Fixes: QTBUG-82910
Pick-To: 5.15
Change-Id: I4883b5d06863ba284883dd95281bed2ce7203e29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- don't refer to the class with template arguments in the body of the class
(incl. one where we got the template args wrong)
- make namespace-level swap a non-member friend
- make default ctor constexpr and non-explicit
(default ctors should never be explicit)
- make ctor from std::nullptr_t constexpr
- remove op= from std::nullptr (will be handled by op=(T*) anyway)
- pass QTaggedPointer by value (it's a Trivial Type, so can be passed in registers)
- fix missing QTypeInfo for non-default Tag types
- remove unused include limits.h
- make qHash-able (why is the tag ignored?)
Change-Id: Idee1d685ac365c988698a8637fd5df3accfc1396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This value is the equivalent of qt_module.prf's MODULE_INCNAME and can
be used to specify a name for the module's include subdirectory. The
default is Qt<ModuleName>.
The include name is stored in the module's target property
MODULE_INCLUDE_NAME.
Change-Id: Ie6c8f6882ee2c3db78884ae5781593c803be3c05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The class is documented as obsolete, and the majority of APIs is marked
as deprecated. In this first phase, remove all explicitly deprecated
APIs and trivial implementations.
The test case is complete removed; what's left when code that uses any
of those deprecated methods is removed is not testing anything
meaningful.
For some methods, there is no practical replacement using QScreen yet,
and QDesktopWidget is still used in QWidget internals. Those require
refactoring to only use QScreen before the rest can be removed.
Change-Id: I8f7c968ec566820077221d37b817843758d51d49
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Rather than have a paletteChanged() signal which can be connected to for
tracking when the application palette has changed, then it is better to
use the event that is sent to all windows and the application itself.
That way it is easy for a window/widget or item that cares about the
change to the application font to catch it in the event() function.
[ChangeLog][QtGui][QGuiApplication] Deprecated paletteChanged() signal
in favor of QEvent::ApplicationPaletteChanged.
Change-Id: I95da211e30590e357007cc14d8ee266baceba7b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
migrating backend was done if the QNetworkSession changed. With
QNetworkSession gone this was no longer called from anywhere.
Change-Id: I8c995001f9d4c7ae83446b4d29fa62c954c79889
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And enable the same default when building Qt itself (it's implicit).
Allow opting out on a target-by-target basis, by using the public
qt_disable_utf8_sources() API call.
Change-Id: Ifc19a744d57b96b1c74a6926a0c6628c2a820464
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QMake variables are always string lists, but some variables are used to
represent single string values. People tend to fill those variables with
multiple values and expect them to be joined by spaces.
Exhibit A: qtdeclarative/tools/qml/qml.pro
QMAKE_TARGET_DESCRIPTION = QML Runtime
QMake supports this for many values. Do the same for Scope.get_string().
Change-Id: I6af22bc1bfed07a4d8eac94d7315051a5bcb7a4d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
These functions mess in bad ways with the overload set (they, fatally,
attract char16_t, e.g.).
The no-ascii warning now comes from the QChar(char) constructor, so
it's not lost.
[ChangeLog][QtCore][QString] Also removed op=(char), op+(char,
QString), op+(QString, char).
Change-Id: I1471c9ddb4c6869aff6e527516e2c78b80b7d7d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Even in Qt 5, remove() can be passed an alias to *this. In Qt 6, with
the advent of substring sharing, this will become even more
pronounced. Use the same fix as was already used in QString::insert().
Pick-to: 5.15
Change-Id: I1a0d3d99fd7dff6e727661646d2cbfdc94df2682
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QLabel ensures a text control in its focusInEvent, and from that point
on lays the text out using the control. A label with text control will
place the text so that there is space for a cursor and text selection,
resulting in text shifting when a label receives focus without having
had a text control before.
Instead of creating the control only on focusIn, ensure that it's
created for any QLabel that can receive focus.
Change-Id: I26c9df3affa08f2360ad4b94de43bd85e2e2e164
Fixes: QTBUG-84080
Pick-to: 5.15
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>