We want syncqt to be built optimized by default. The current approach
set the default build type for the external projects and optimized
flags for the non-configure-time syncqt build. The problem is that
syncqt still have compiler flags littered by either the Qt configuration
type or the system defaults that are applicable for RelWithDebugInfo
configuration(the default one we chose for syncqt).
This patch makes sure that we cleanup all compiler flags from any
optimizations and apply optimized flags for all configurations. Also
we discard '/RTC1' flag if it's set. Configure time executables now
respect the language related flags that are set in the project and
adjust the flags passed to try_compile.
For linker flags we should use those that are applicable for the
preferred build type. Since syncqt is built in RelWithDebugInfo
by default we should replace linker flags in all configs with
those are used for RelWithDebugInfo configuration.
Fixes: QTBUG-114925
Pick-to: 6.5 6.6
Change-Id: I782f81a36f5ef7ee4d342ce8ac6c217cb2552f3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* use nullptr
* use member init
* set ExpandingFieldsGrow fieldGrowthPolicy for QFormLayout, which
makes it behaviors similar on macOS as other platforms
* select first row to make up/down keys works by default
Pick-to: 6.5 6.6
Change-Id: I25d9869d2ca1c7274c2b750aada8270734787546
Reviewed-by: Liang Qi <liang.qi@qt.io>
They're already suppressed for clang.
-Wself-move was added in GCC 13.1, the CI still doesn't have that so
wrap it in an "#if Q_CC_GNU >= 1301".
Change-Id: I5c2ec78a5003485261b4e3125f85c5b78dd0db22
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
/proc/self/mountinfo is available on Android too AFAIK (it's available
on an old Android 6.0 phone I have).
Change-Id: Ia4b04a143b362c7a18773716a90897ce4c5fc5f0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The check_language macro spawns a new cmake subprocess to detect
availability of a language. We use that to detect availability of
the Objective-C/C++ languages when targeting Apple platforms.
That's problematic because the parent process CFLAGS / LDFLAGS env
vars influences the result of the subprocess compiler detection,
and in some cases that can fail the detection.
An example of that is passing iOS specific flags which then get
mixed with the default macOS flags added by CMake, resulting in
a linker failure.
Instead of using check_language, explicitly enable the Objective-C
and C++ languages when targeting Apple platforms because we know
that we need them for compiling Qt.
This avoids the issue because enable_language is not spawning a
separate cmake sub-process and thus passes more information to the
underlying try_compile project to ensure a successful check.
The change also means that CMake will error out earlier in case if the
Objective-C compiler is not found, which was not the case before.
Pick-to: 6.5 6.6
Fixes: QTBUG-114470
Change-Id: I1a16c1e5828dfe10b2d7da27cc9a8c787517ab8e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This class doesn't exist on MSVC, so the inline functions didn't
become part of the ABI, so it suffices to only export the two
out-of-line functions.
Pick-to: 6.6
Task-number: QTBUG-104164
Change-Id: Iedf8b0b1882802db53406942d7ac2a27e7ddfa23
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
To maintain flexibility in how we store the features, we
introduce accessors through indirection rather than accessing
the property directly.
Made as response to API review.
Pick-to: 6.6
Change-Id: I3e5d4ddabe93f67796af4626fddefe028ded9888
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
The feature allows to not use OpenSSL in QCryptographicHash
implementation and removes OpenSSL from dependencies of QtCore if
disabled.
Fixes: QTBUG-114783
Pick-to: 6.6
Change-Id: I2a49fa9ddfa5acedcfc95a3330fd7863a8052a5c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
... and collapse adjacent C string literals.
Both QStringBuilder and non-QStringBuilder builds have no problem
resolving an operator+ for char[] and QByteArray, so there's no need
to turn the char[] into a QByteArray using the _ba UDL first.
It just causes pain because not all active branches support this UDL,
so remove, to bring this code in line with what the cherry-picks to
6.2 and 5.15 must needs had to use.
Amends 6326bec46a.
Pick-to: 6.6 6.5 6.5.2
Change-Id: Id3d61483729c51c82f58b826efcc8fc7960c3ccd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
The /coin directory is not installed, so trying to include a .qdocconf file using a relative path from an (installed) global configuration will fail.
Task-number: QTBUG-113326
Change-Id: I761b1a7eb19ca9d6a768f1367e30d5eaf80cb816
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
I added the ability to use `-no-unity-build`, and included the
batch size in the config.summary as well. In addition, qt_feature is not
being used for `-unity-build` anymore.
Pick-to: 6.5 6.6
Change-Id: I4a10e03d3505336d2256280ed2854ec0425df47f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If an application runs on a macOS or iOS version that introduces new
permission statuses that we haven't accounted for, we don't want to
crash.
Replace Q_UNREACHABLE with a warning and Qt::PermissionStatus::Denied.
Pick-to: 6.5 6.6
Change-Id: I063042f510caaa8936742f6195bd455d09c4d9ee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For now we do not have a QCalendarPermission::AccessMode::WriteOnly,
so we have to report Qt::PermissionStatus::Denied.
Fixes: QTBUG-114864
Pick-to: 6.5 6.6
Change-Id: I94e92912ef4c24adb524ccf2cf28553115d6781b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
CTFontDescriptorCreateMatchingFontDescriptors has been observed to
return nullptr, so we need to handle that explicitly.
Fixes: QTBUG-113698
Pick-to: 6.5 6.6 6.2
Change-Id: Ic9fa574c14068fcae98fe8e6ceddd8a4f7008210
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Use unique_ptr instead of manual memory management
- Improve consistenty in variable name with the simpletreemodel
childrenNumber -> row, m_ prefix for member variables
Change-Id: Iface30c2224c2b1db7c623a9e6fcbb449c556f3e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since qt_noop() is supposed to be a no-op, it should not affect
constexpr'ness and noexcept'ness of functions and expressions it's
(indirectly) used in.
That requires that it be constexpr and noexcept itself. Add the
keywords, but guard against use from C. We can't use our Q_ macros
(which would enable noexcept for C, too, on some compilers, because
qcompilerdetection.h depends on qtnoop.h, and we don't want the
circular dependency.
Pick-to: 6.6 6.5
Change-Id: Ie5441c423b7942a6c956345126fc7aec99907d25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A class-level [[nodiscard]] used to be the only way to get a waring
for code such as
QMutexLocker(&mutex);
with original C++17 means. This was because a few of our compilers
would warn about the presence of [[nodiscard]] on ctors, which is
really the semantics we want: we don't want to prevent users from
passing QMutexLocker out of functions and users of those functions
from ignoring the return value, if they so choose. That should be the
choice of the author of the function returning such types, not ours.
So QUIP-0019 makes class-level [[nodiscard]] conditional on proper
rationale in the user docs (or the commit message in case of private
API). Since none of the existing uses really strikes this author as
particularly convincing, remove them all.
All these classes have gotten Q_NODISCARD_CTOR on all their ctors, so
we continue to provide the same true positive warnings, minus the
false positives when returning from functions, at least on the
majority of compilers (and it's not as if all compilers interpreted a
class-level [[nodiscard]] as a trigger to warn on the initial example
of this commit message).
Task-number: QTBUG-104164
Pick-to: 6.6
Change-Id: I163356486e7c80f9d69bf67023010a88233fe662
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QGtk3Theme uses the GTK button foreground as a default for the
WindowText color role. When a GTK3 theme has no specific color for the
entry text, this can lead to text on certain assets looking darker
and thus disabled.
This discontinues usage of the button foreground for the window text.
Finding the WindowText color role in QPlatformTheme::SystemPalette now
follows the following logic:
(1) GTK normal entry text is used if specified. This is the preferred
option, copying GTK behavior.
(2) If (1) is not specified, the GTK default text color is used, making
WindowText equal to Text.
(3) If neither (1), nor (2) are specified, the WindowText color role is
taken from qt_fusionPalette, where it is also equal to Text.
The SystemPalette is used as a default template for all other control
or widget speicific palettes. The rules above therefor apply to all
screen assets (unless they use a JSON file to specify a their
individual WindowText).
[ChangeLog][QGtk3Theme][SystemPalette][WindowText] Default to GTK
Entry Text / Normal Text / qt_fusionPalette
Fixes: QTBUG-114600
Pick-to: 6.6 6.5.2 6.5
Change-Id: I4c96ac7d096526faf4c2feee436753990c6c9f92
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Explicitly check that at least CMake 3.21 is used when building Qt or
when using Qt in a project.
This only affects macOS and iOS builds.
We check for 3.21 instead of 3.21.1 as described in the documentation
to avoid an error like:
Policy VERSION range "3.21.1...3.21" specifies a larger minimum than
maximum.
Until the technical limitation is addressed, if someone does end up
using 3.21.1, another existing check for "unsuitable" cmake versions
(as opposed to minimum required) will let them know they should use
something newer.
Amends 1cf3295cef321c9a587af2f2de7740c0cd3ca743.
Pick-to: 6.6
Fixes: QTBUG-114869
Change-Id: I2a479baaa63cfbe23af187cf0796e1c00042692b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Use std::unique_ptr to manage items tree memory allocations. This also
use the new string literals operator.
Change-Id: Iab002b5dc612b75cef0be10862e263c6c6c013c1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Pins the vtable to a single TU and therefore prevents duplicate
vtables, -Wweak-vtables warnings and false-positive dynamic_casts.
This requires exporting QGenericRunnable, which hopefully won't
also export the nested class.
Pick-to: 6.6
Task-number: QTBUG-45582
Change-Id: Ie1f29d25b0dcdee7654c33c497e8e0350d12e311
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Mobile Safari generates touch pointer events with negative
pointer id's, which causes processTochEvent() to skip
the event instead of synthesizing a mouse event.
Ensure that the id's are always positive by taking the
absolute value of the event.
Pick-to: 6.6 6.5
Change-Id: I1514329dc76ecc4b9103f7deca9642aaf304df8b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Newer msvc gives C4309 warning for 'initializing':
truncation of constant value
Warning would go away if we had 'enum foo: unsigned'.
Disable the warning for problematic enums is not enough
as it also complains about headers coming from windows sdk
like:
C:\Program Files (x86)\Windows
Kits\10\include\10.0.22621.0\shared\wtypesbase.h(395): warning C4309:
'initializing': truncation of constant value
Note 10.0.22621.0 is the latest sdk already.
Do not disable language extensions for header clean target.
This reverts commit 8bf602518d
Task-number: COIN-1059
Fixes: QTBUG-114931
Pick-to: 6.6
Change-Id: Ifc3883f88a6bd52794a37dc640eca99c158a40e0
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
After fixing the data type for D24S8, we can now implement attaching
depth and stencil (with the same texture).
For Metal we need to set a stencil flag correctly.
This allows using D24S8 in the manual test, which is likely the format
that is going to be commonly used when setting up multiview with
Qt Quick.
Fixes: QTBUG-114904
Change-Id: Ife425c6cb3e09bfe40092c841b78f7a93bb6a4cd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Cannot just do like with other APIs and expose a view of multiple
array layers. The only option is to use the multiview-specific API
and specify layers 0..view_count-1 in the depth texture.
This allows having depth in a multiview render pass with OpenGL.
Note that this does not cover stencil. D24S8 does not work, so
we may need to explore having a dedicated, separate stencil
texture.
Task-number: QTBUG-114896
Change-Id: I06ede1d77fef199148d595a55d144c96dc3cbc9d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...and expand the docs a bit.
Task-number: QTBUG-114896
Change-Id: I969c3aa2fa72a242e275e4b6dd996df20d1cd2ab
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Behave identically to Vulkan, i.e. create a view that spans all array
elements. (except when the range is set)
This becomes relevant with multiview, where the depth/stencil attachment
the render target must be set up with a texture array as well, similarly
to the color attachment. But applies even to D3D11, even though it is
not common to use a texture array there, but it's possible.
Task-number: QTBUG-114896
Pick-to: 6.6
Change-Id: Ieda8475500b0553f8c14aa9ecad57001b9714d49
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Made this change because there was no example of the interaction
between QBindable and non-bindable properties.
Pick-to: 6.6 6.5
Task-number: QTBUG-114689
Change-Id: Ief7662f8af5e6fab32491418fa35f0daa937819d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Make sure that QT_ANDROID_DEPLOYMENT_SETTINGS_FILE is expanded
correctly and completely when using it in custom commands.
Task-number: QTBUG-114888
Pick-to: 6.5 6.6
Change-Id: I87c9cb052ea6afedd129fec0a1c415ad38e8eeb5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>