Qt 5.4 is not documented anymore since quite some time.
Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since glCompressedTexImage2D() does not allow zero data, it could not
be executed during texture build. Instead it would be done during the
first subresource upload. This made atlasing clumsy, since one had to
introduce a fake upload of the full texture size before the subtexture
uploads. This commits lets the gles2 backend deal with that instead.
Introduces the UsedAsCompressedAtlas QRhiTexture::Flag for opting in
to this behavior.
Task-number: QTBUG-78582
Change-Id: Ib6e4ea637c62cc8a51bd9a4a06e59882f335f2a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When storing a void* pointer to the texture handle, we had
to ensure that the variable would exist until the build phase,
which is error prone and caused errors in QQuickWidget because
we copied the texture ID from the FBO into a local variable
before passing it into QQuickWindow::setRenderTarget().
The reason for using a void* was that we cannot know the width
of the handles in the different backends, but we do know that
they are 64-bit at maximum, so instead of storing potentially
dangling pointers, we just make it a 64-bit integer and cast
it back and forth in the backends.
Task-number: QTBUG-78638
Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
resize() to a smaller size does not reallocate in Qt 5 if the container
is not shared. Match this here.
As a drive-by also fix resize calls on raw data strings to ensure
they are null terminated after the resize.
Change-Id: Ic4d8830e86ed3f247020d7ece3217cebd344ae96
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
If we already know the certificate, there is no need in adding it again.
This function is deprecated, but will stay forever in 5.15.
Pick-to: 5.15
Change-Id: I760f5bcffea78ac02c5643ee1112725edd32f15a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
DSA/DH/etc _bits functions were first deprecated, then un-deprecated,
so we don't worry about them for now. SSL_CTX_load_verify_location was deprecated
and two new functions were introduced instead (one using file, the second
- path). It's unfortunately 3.0 only, so we have to check OpenSSL version.
DH_check is deprecated and we have to use EVP_PKEY_param_check with
tons of a boilerplate code around.
Fixes: QTBUG-83733
Pick-to: 5.15
Change-Id: Icd401ab6aad30c23c37443c7bc82c702fb843640
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This reverts commit e875f45805.
Reason for revert: syncqt creates a master header that includes
the *Depends header. Therefore we must always create the *Depends
header. Ignore for now that *Depends headers are empty and pointless
for module headers.
Change-Id: I1dcc836788b3d46c4f1b504d2d64e9eb67b66206
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For now, we have to turn off the 3rdparty lib generation code for
qt_lib_XXX.pri files, because it's broken for NMC if the 3rdparty
libraries have different binaries per config.
The actual fix is more involved.
Task-number: QTBUG-84348
Change-Id: I863e69085b68c0dbbb3f6c415111bc255799e155
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Introduce a qt_finalize_module function that is called as a
CMakeLists.txt finalizer and call qt_generate_module_pri from there.
This is done in preparation for writing the QT.XXX.depends entries to
the module pri files, because we must do this after all dependencies
have been added.
Change-Id: Ia61db73383541651389fd647523ef535792874d4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as
Q_DECLARE_SHARED.
Let's hope we'll collectively get better at detecting missing
Q_DECLARE_SHARED so we won't need a
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future.
Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Once the clipboard data is queried then we can clean up the previous
QMimeData object created. So rather than keeping on to it and cleaning
up when the clipboard is created we can delete it at that point. This
means it is not necessary to make it a QObject subclass, so we can save
in that respect too.
Pick-to: 5.15
Change-Id: I152ca6ea5c713abe25f75ca2016759c0e3152bfb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since the helper is being reused then the m_selectedFile variable should
be cleared, otherwise it ends up appending the new result to the old
one.
Change-Id: I72c24409dc91f91bad55a7da2772605f03fb4623
Pick-to: 5.15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
If an OUTPUT_DIRECTORY option is provided, it should be used instead
of discarding it.
Change-Id: Ie53b56616f16589f7c05ff9378d7ba2e2ba34726
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We could sometimes cache a partially constructed object if the accessibility
interface for that was created during construction time of the object. This
usually ended up in that the interface for e.g. QMenuBar was stored in the
cache as a QAccessibleWidget, regardless of if the a11y factory supported it.
Since it was already in the cache, it remained the same for the entire lifetime of the
application, causing e.g. QMenuBar not have the correct accessibility behavior.
Task-number: QTBUG-83993
Change-Id: I72b2d5a93f6b397fd3666d45951109e3e5aff754
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
The module pri files are supposed to add their public features to the
global QT_CONFIG variable.
Change-Id: I9a1719f897747a1d89011b1f1231c05a23539def
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Avoid writing module_plugin_types-NOTFOUND into the module .pri files.
Change-Id: I2fed7b0d1c21e2233eebcaca419f522a07d22af4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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>