In a qmake build this file serves the purpose of setting the right
prefixes for the build directory's qmake binary. This can be used to
build Qt repositories other than qtbase, esp. in a top-level build.
In the CMake build, we don't have qmake top-level builds, and we do not
support building Qt repositories with the build directory's qmake binary
(exception: non-prefix build).
To build a Qt module or user project with qmake, the installed qmake
must be used.
This fixes qmake for non-prefix top-level CMake builds.
Change-Id: Ibd10c36e8359225553d782d0c8117760db9f3370
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is required if we want to be able to get rid of the property
cache.
Also reserve a flag for var properties, in case it turns out that we
need to keep the distinction between var and QVariant properties in QML.
Change-Id: I55c2191adcc2d94bd8f148216e26423defaa900f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Remove QMetaProperty index member. Instead, add a function to compute it
on demand from the QMetaObject.
Also remove the remains of the signature function.
Original-patch-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I5b16d444e7474216a535e3e93a118825cd0e6090
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This changes the layout of the meta object data, so
also bump the meta object revision.
Original-patch-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I176fb16c207e8ebe59e358e69554be813406232f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Property flags should be compile time booleans, not something to
be determined at runtime.
We've been using this to dynamically disable some properties in QWidget
based classes dependent on the state of a different property, but this
should better get implemented on top of our widgets.
Change-Id: I6296e8761303ecdf24d9e842142e8596304c015d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Centralize the offset handling in one place and avoid lots of magic
numbers in various places. Expose the number of ints per method in
QMetaObjectPrivate as a constant, so that code in other places can
access it via private API.
Change-Id: I59790287a17ea47e6160ec65d9c8d0aaee748947
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In static builds, due to our CMake design for auto-linking plugins
being incorrect we sometimes cause link failures on Linux in leaf
modules, because the link line order is incorrect.
So far such failures were fixed by explicitly modifying the order of
libraries on the link line in each failing CMake project.
This proves to be problematic because the failures appear in seemingly
random integrations that don't even touch the build system parts.
Until we fix the design, another less performant but more
general / safe way is to increase the link interface multiplicity,
which causes a cycle of libraries to be repeated more than 2 times
on the link line, thus giving the ld linker more chances to figure out
which symbols are needed for linking.
Implement this for Linux static builds to avoid random integration
failures for people that know nothing about this issue.
The link multiplicity for all qt modules is increased to 3, thus
QtGui would be repeated 3 times on the link line of each dependent
library. The value is also configurable via the
QT_LINK_CYCLE_MULTIPLICITY cache variable.
Task-number: QTBUG-83498
Change-Id: I2fd2bb2b5e7fec4e3ef5d1194668b524d20f7067
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Requires adapting a few config checks since cmake currently
does not detect directwrite.
Task-number: QTBUG-83255
Task-number: QTBUG-83931
Change-Id: I521f1924f701260b41dccbcecf87b19f08df5ccc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
CMake's default import library extension for MinGW is .dll.a. The code
in qt.prf that resolves the values of the QT variable expected an .a
extension.
To play well with CMake world we keep the the .dll.a extension for
Qt's libraries and teach qt.prf to handle both. In order to do that we
need to check for the existence of the .a or .dll.a file. If none of
these candidates was found we print a warning and fall back to the old
behavior.
Task-number: QTBUG-84781
Change-Id: If394f2d6acd104deb0c3a49240009a1900a506f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To be in line with the qmake build we drop the "d" suffix for MinGW
debug libraries unless the debug_and_release feature is enabled.
Task-number: QTBUG-84781
Change-Id: I1b83492bff561d3d7647dde467931ec3866ae940
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The QStringView versions will do the job just fine :)
Task-number: QTBUG-84319
Change-Id: I376b310deb27683fd98bbcc55e0f56014cacecc3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Add QStringView overloads where they were missing. This keeps things
almost 100% source compatible.
Task-number: QTBUG-84319
Change-Id: Ica8ee773b2ce655e9597097786117959e34b236e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When doing a top-level build,
QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX is not set in the
top-level scope. There's no point really in using the relocatable
path anyway, given this will only be displayed once when either
configuring qtbase or qt6.
Just use CMAKE_INSTALL_PREFIX directly.
Change-Id: Idb7e1953745f55048c42155868c2dd9384876c7c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
It used to be called HAVE_DASH_UNDEFINED_ERROR, but that always
cause Coin to print the compile check as the first build error snippet
because it contains the word "error", and whenever you get emails from
Gerrit the first snippet is always this compile check.
Rename it to avoid confusion in emails and Coin status reports.
Change-Id: I5487623abf9df177b100d2b45635688504f0e25a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Amends comment 6e1d70ae12, which
introduced SE_PushButtonBevel so that QPushButton could ignore clicks
outside of the button's bevel.
In the macOS style, make sure that the framerect we pass to
NSButton::alignmentRectForFrame is the rect we receive from QPushButton
in the style options. The frame property of the shared NSButton* object
might not be initialized.
In the style sheet style, handle SE_PushButtonBevel the same ways as
Contents and FocusRect, as it is not a separately styleable property.
Change-Id: I12eb1b046c864a02b34d276e6352e2e16d44231e
Fixes: QTBUG-84852
Fixes: QTBUG-84879
Task-number: QTBUG-81452
Pick-to: 5.15
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
To allow treating long press as right click on Android, set
the environment variable QT_ANDROID_ENABLE_RIGHT_MOUSE_FROM_LONG_PRESS
to 1.
Pick-to: 5.15
Fixes: QTBUG-73416
Task-number: QTBUG-84179
Change-Id: Ibe1d6af6ab9965112f1418638a088717798b554c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
For static builds of Qt we installed the plugins into the lib
directory. However, they are expected in the plugins directory tree.
This happens, because we pass a value of an uninitialized variable to
ARCHIVE DESTINATION in the qt_install call in qt_internal_add_plugin,
and CMake defaults to "lib".
This flaw was introduced in b42feb02ce with the following intent:
"This patch also changes add_qt_plugin() to use the value provided in
INSTALL_DIRECTORY for ARCHIVE_INSTALL_DIRECTORY if no value is provided
for the latter."
The patch changed the value of arg_ARCHIVE_INSTALL_DIRECTORY but
missed to set the variable archive_install_directory, which is
actually used in the qt_install call.
We now directly set archive_install_directory and remove the unused
archive_install_directory_default variable.
Task-number: QTBUG-84781
Change-Id: Ifd0475d8452272e8765bf42fd912a45cfa3dbbd1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Skip reading JPEG and PNG comments information from the header to save
the memory.
This can now be configured through the feature system.
Change-Id: I3744312f69aa3201d5188776cbd99fe690b75d32
Task-number: QTBUG-83123
Pick-to: 5.15
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
On Windows 7, it has been observed that the time zone registry key
is a string of size 256 padded with 0. Use QString::fromWCharArray(),
relying on 0-termination to cope with it.
Pick-to: 5.15
Fixes: QTBUG-84455
Change-Id: I5d242e2de73c1ea09344aee8de8eea941bc52bab
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Emscripten does not like when the post data gets deleted in the local
scope.
Fixes: QTBUG-84685
Pick-to: 5.15
Change-Id: I17f9d5cc3253c26b42253daa68e2fbaccc48eaf6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Whoever wrote this test, was a PROPER hacker: trying to force a TLS implementation
not to properly compress some data, they generated a sequence of bytes in a very fancy manner,
something like 255 0 0 0 255 0 0 0 123 0 0 0 255 0 0 0 - yeah, it's really a random sequence
of bytes, surely, it's impossible to compress! Meh.
Pick-to: 5.15
Change-Id: Ia10ae18a40b5b8f006c45147b06fe5be6efcb129
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Calculate an initial position based on the current size hint
and pass it to QMenuPrivate::exec(), which does screen checks
based on it.
Amends a78d667431.
Pick-to: 5.15
Fixes: QTBUG-84462
Task-number: QTBUG-78966
Change-Id: Icae8d2bc0fb50c4c853cfebaa2b2250fc06542e3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Member initialization syntax allows declaring now inline default
constructor as default. Remove copy/move/assignment operators, which
had already been disabled.
Change-Id: Ie407e65aa39c72f5e6436a6beaf9323663f78cfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Amends 32b586864e, which added an override
of QStandardItemModel::roleNames(). It's good for it to have its own
QHash so that roles can be added, and because
QStandardItemModel::setItemRoleNames() remains un-deprecated; but before
that change, they were the roles that QAbstractItemModel had initialized
from QAbstractItemModelPrivate::defaultRoleNames(). In particular, we
need "display" to map to Qt::DisplayRole by default; several tests in
qtdeclarative depend on that.
Change-Id: I58b2d6aa6b6c78b1d618335ddc4ecb834af57274
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
LongFormat and ShortFormat are not limited to day and month names.
Different locales might also use numbers for months instead of strings,
so the example is a bit misleading.
Instead of extending the enum description even more there's now
examples in the dateFormat(), timeFormat(), dateTimeFormat()
functions.
Task-number: QTBUG-83841
Pick-to: 5.15
Change-Id: Icea2cbce7e9505d706a2171e7d1f4486abdb20be
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Make QPair an alias for std::pair, and qMakePair just a forwarder
towards std::make_pair.
Why? Fundamentally to ditch a bunch of NIH code; gain for free
structured bindings, std::tuple and std::reference_wrapper
compatibility, and so on.
Breakages:
* Some that code manually forward declares QPair.
We don't care about it (<QContainerFwd> is the proper way).
* Some code that overloads on std::pair and QPair. Luckily
it's mostly centralized: debug, metatypes, testing macros.
Just remove the QPair overload.
* Usages of qMakePair forcing the template type parameters.
There are a handful of these in qtbase, but only one was actually
broken.
* std::pair is NOT (and will never likely be) trivially copiable.
This is agreed to be a mistake done by practically all implementations
in C++11, can can't be fixed without breaking ABI.
Some code using QPair assuming it's trivially copiable may break;
exactly one occurrence was in qtbase.
* QMetaType logic extracts the type names in two different ways,
one by looking at the source code string (e.g. extracted by moc)
and one via some ad-hoc reflection in C++. We need to make
"QPair" (as spelled in the source code) be the same as "std::pair"
(gathered via reflection, which will see through the alias)
when compared. The way it's already done e.g. for QList is
by actually replacing the moc-extracted name with the name
of the actual type used in C++; do the same here.
On libc++, std::pair is actually in an inline namespace --
i.e. std::__1::pair; the reflection will extract and store
"std::__1::pair" so we need an ad-hoc fix to QMetaType.
[ChangeLog][QtCore][QPair] QPair is now an alias to std::pair,
and does not exist as a class in Qt any more. This may break
code such as functions overloaded for both QPair and std::pair.
Usually, the overload taking a QPair can be safely discarded,
leaving only the one taking a std::pair. QPair API has not changed,
and qMakePair is still available for compatibility (although
new code is encouraged to use std::pair and std::make_pair
directly instead).
Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
For symmetry with other views.
[ChangeLog][QtCore][QLatin1String] Added toString().
Change-Id: I4a0677e2dbd009e8da097f4cb0dbb27a6baf5469
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We deprecated several setters on QSslSocket, no need to test
them then (and I'm removing them in Qt 6 anyway, so changing
the test is the phase 1).
Pick-to: 5.15
Change-Id: I5807abfb280cbacd4fcc19468793f9d1f3b2ff20
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Because find_package usually creates targets in a local scope,
qt_generate_prl_file fails to generate a .prl file that has
references to generator expressions like
"$<TARGET_FILE:Freetype::Freetype>" which references targets
that are not found in that specific scope (e.g Freetype target is
present in qtbase scope, but not qtsvg scope).
This happens in static top-level Qt builds, and thus fails the
configuration. While we try to figure out how to fix this adequatly,
don't generate .prl files in such a configuration.
Task-number: QTBUG-84874
Change-Id: I69cf0ad1419d21e3676e1374624601f00936c405
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Users / developers usually configure a single example. The CI
can still continue to explicitly configure and build all examples.
Task-number: QTBUG-84471
Change-Id: I1c9ac857e7ad0e5602037265194f0a6742386b51
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Fixes the 'add_library cannot create imported target "dbus-1"
because another target with the same name already exists' error
when doing top-level static builds.
It's caused by the loading of Qt6DBus dependency when configuring
qttools.
Task-number: QTBUG-84874
Change-Id: Ia84ed460c4ce25de45fb41cb13edd0e63a276f11
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
[ChangeLog][General] The QtOpenglExtensions module has been
discontinued. It provided only convenience functionality for certain
direct OpenGL usage. With the new RHI graphics API abstraction, that
is no longer a primary use case. Applications that still need to
access that API have a number of alternative options, including
QOpenGLExtraFunctions.
Fixes: QTBUG-84085
Change-Id: I272af61c69ebcec207b576d67d08b59623d485ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>