Needed after commit f3c7d22dd0
that caused CMake to not search libraries under /usr/local.
Change-Id: Ic10925e1c6ee941e7a58a3a219be3d659d3b2fb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
+ runner.os is for example "macOS"
+ matrix.os would be "macos-10.15"
This way we don't mix the CCache artifacts between different versions of the
same OS.
Change-Id: I90da8c1013d661ddddbc22d205af4858db057b14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Namely, -calcSize method of NSControl (we're calling it for NSSlider).
The documentation recommends overriding -layout instead, but we don't
inherit NSSlider thus cannot override anything. Also, he documentation
says that -calcSize call its cell's -calcDrawInfo: if needed.
The default -calcDrawInfo: in NSCell is documented to be a noop and
it would appear NSSliderCell does not override it. Thus we remove
this call.
Pick-to: 5.15
Change-Id: Ic3e8bf742b50528a0616fb73494ec340fcd57e25
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
... and add include for it.
Amends ffb73175e6
Change-Id: I709a5aed13f6f62017b9e4116a03a4dfaae4bb13
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Show a status message when we run syncqt for a module (gives a bit
more insight into why the configuration seems to stall for a moment).
Remove some uninformative messages about generating config.h files
and Depends headers, etc.
Change-Id: I5ff2774b9cf5d92ddde564dc09f4197c2835ee4a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously syncqt did not write content to forwarding headers if they
already existed in the target location, regardless of the contents of
the forwarding header.
This is different from syncqt's behavior when it actually copies
the headers to the target location, instead of creating a forwarding
header that includes another header.
Fix syncqt to read existing forwarding header content, and update the
content in case if it's different from the newly generated content.
This should fix the following non-prefix build case: running syncqt
from a different source + build directory would not update the
forwarding headers in the qtbase build dir.
Change-Id: Ia0a1665a36ce54f1c487101d9a7532fc0aa40c89
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
For all of these we know in advance that the vast majority of usages
will not exceed a certain number of elements. Also, none of these are
copied or moved ever.
Change-Id: I265afec154939c2fd0d1f902d97a86315ec7bc20
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The modifierKeyState variable is based on the Carbon modifiers, and
then further mangled to match the expected format of UCKeyTranslate.
But inside QCocoaKeyMapper::toKeyCode() we compare the modifiers to
Qt::KeyboardModifiers.
To ensure the logic works as expected we need to pass in the Qt
modifiers. This fixes shortcut sequences based on "Backtab".
Change-Id: I089fe601f0fe7a92f746e0a6447e2de0d974d0b2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QCocoaKeyMapper::updateKeyMap would always end up creating a
valid key map, so the logic in CocoaKeyMapper::possibleKeys
for dealing with missing keymaps was not needed, and was
likely copied from one of the other key map implementations.
Since we know that we have a key map we might as well return
it after possibly updating it.
Change-Id: If83974f4ddedae8b1acefbadef48da3ee326eadd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Paying off technical debt from Qt 4 times, and preparation for removing
Carbon dependency.
- Proper variable names (m_ prefix, titleCase, fullyWrittenOut)
- Modern data structures for lookups
- Removal of dead code/variables
- Categorized logging
- Built in constants instead of magic numbers
- Typed variables instead of naked integers
Change-Id: Ie14621e0da8ed61e2185fa05373047204dc4ea62
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This will never work, not unless libc implements it
themselves, since the child process is not allowed to return
from the function that does the vfork(), as subsequent use
of the stack would trash the frozen parent's return address,
and in our case that's syscall(). Instead, we may add a
vforkfd() function that takes a callback function that will
be called in that context, like the glibc clone(3) wrapper
does.
Pick-to: 5.15
Change-Id: I1dba29bc0f454df09ca1fffd161800b453c00593
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We don't need to include the possible keys in the log output
as that's handled by the call site in QShortcutMap::find.
Change-Id: Ie0635f63a4304fde40a8b671385518dd1e42e2dc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
qmake builds of Qt don't use libraries in /usr/local because the
path is not considered a system path. Only the SDK path should be
used as a source of system libraries.
We should do the same for the CMake builds, which involves a couple of
things.
Tell CMake not to consider /usr/local (and a bunch of other
paths) as system prefix paths.
Disable pkg-config usage which by default is not used in qmake
Windows and macOS builds.
If a user wishes to use libraries located in /usr/local on macOS, they
can explicitly enable the behavior via -DFEATURE_pkg_config=ON.
In addition to enabling pkg-config, that will also disable the system
prefix modification described above.
Implementation notes
To disable pkg-config usage, we set an empty path for
PKG_CONFIG_EXECUTABLE, because there is no other good way. The
downside to this is that a lot of warning messages will be printed
that the pkg-config package can not be found.
The pkg-config feature needs to be computed in QtBuildInternals before
qtbase/src/configure.cmake, because it's too late to do it in that
file where a few qt_find_package calls already exist.
The feature value is also saved to QtBuildInternalsExtra, to make sure
that pkg-config is disabled whenever building another repo.
System prefix adjustment is done by removing paths from
CMAKE_SYSTEM_PREFIX_PATH.
Ideally we would remove also /usr as a path, to match what qmake does,
but that breaks find_program() calls for perl, python, etc.
We have to make sure that qt_find_package does not look in
PATH when looking for packages, which is the default behavior, because
PATH on macOS most likely contains /usr/local.
One last curiosity for future generations is that CMake 3.18+ has
merged a change to prioritise SDK locations over regular /usr/lib.
Fixes: QTBUG-85261
Change-Id: I28fe5bae7997507a83b37b4eb1e0188e64062c57
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Not to pollute the global namespace with rather generic names
(especially in case QT_NAMESPACE is none); also drop the
(now)redundant 'Q' prefix in the names.
Change-Id: I57ea7e3996cced705f7ddbdbc1e0231191b31c43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It's supposed to return the same as toLocalFile(), for local files,
which means passing QUrl::FullyDecoded just like QUrl::toLocalFile()
does.
But a few code paths were testing component formatting options without masking
other FormattingOptions like RemovePassword, so this had to be fixed.
Fixes: QTBUG-84594
Change-Id: I82f15148b6d93516200f9ad6258d474e7f10924a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adds the CMake equivalent to the classical -device-option key=value
configure argument:
-DQT_QMAKE_DEVICE_OPTIONS=key1=value1[;keyN=valueN]
The keys and values get dumped verbatim into qdevice.pri.
This patch also ports the machineTuple configure test. Its result is
written into qdevice.pri as value for the GCC_MACHINE_DUMP variable.
Change-Id: I29f2323fd87639fafaed99ec7446c7ee75504705
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's now possible to pass -DQT_QMAKE_TARGET_MKSPEC=foo to cmake. If the
value is not passed, then we will guess the mkspec like we did before.
Change-Id: If6e8324654cb8bd83d3cba9eb6ee1e4ad2692a2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For a cross-built, gcc-built Qt, the qmake build writes code into
qconfig.pri that adds the --sysroot flag to compiler and linker flags.
Follow suit in the CMake build.
To keep the diff small between the qmake-generated and CMake-generated
qconfig.pri files, the sysroot code is added at the top of
qconfig.pri, which is the reason for the new 'content' string variable.
Change-Id: I50649100e4368be64bf98ca19e46312e3ebf619d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When cross-compiling, we now create a target_qt.conf file that's to be
used with the host Qt's qmake. With "qmake -qtconf .../target_qt.conf"
projects can be cross-built against the cross-built Qt.
We also create wrapper scripts for the host qmake to save the user from
passing the -qtconf argument.
Fixes: QTBUG-82581
Change-Id: Ib5866e7e820369efea9eb3171e3e3e3ca5c0c3c1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Omitting state machine and docs for now.
Task-number: QTBUG-84469
Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
On tvOS touchesEnded: occasionally gets called with touches that have
not been passed via the touchesBegan:. When this happens previously
cached touch event (that HAVE been passed to touchesBegan:) are no
longer valid.
This causes a crash when testing if new touches contain old ones (since
NSSet dereferences the needle which is no longer valid).
Fix uses the unique (unsigned int) hash that UIKIT assigns to the
UITouch instance so cached copies are never accessed.
Furthermore, tvOS only supports single touch so now just clearing cache
when touch has ended.
Task-number: QTBUG-84383
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I7592cdde74ce834285e7b14196171f6b57736cc8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The plugin-manifests feature has the "negative" CONFIG value
"no_plugin_manifest". On negation, we're supposed to strip off the
leading "no_" instead of adding another one.
Change-Id: Id2c66da41f22881272d5b923f12b85d9fcc2c9d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reduces the amount of warning messages when the pkg-config
feature is disabled.
Task-number: QTBUG-85276
Change-Id: I11a6dfb6273a1e48c47d1ef5c1a5f70ba990fbc0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Before this change, the qt_lib_foo_private .pri files contained
absolute paths to libraries, e.g.
/usr/lib/x86_64-linux-gnu/libcups.so
Whereas the qmake build instead embeds link flags like -lcups.
Detect absolute library file paths, and transform them into link
flags. This should make the .pri files relocatable.
Fix the add_custom_commands to have the scripts as dependencies.
Make sure to pass the suffix, prefix and other options to the
qconfig.pri generation command as well.
Also reverse the order of the link flags, to mirror the order
that qmake generates for .pri files.
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I7bc3b234d9c86c785b169b11f3042450aa225c1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is consistent with the qmake mkspec in common/mac.conf
Task-number: QTBUG-85240
Task-number: QTBUG-84781
Change-Id: I99df365a3be541356482d29eda806020f4e298d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Our .prl files embedded an absolute path to the OpenGL.tbd file. This
obviously breaks their usage when used on another machine when no SDK
exists.
To fix that we need to use a "-framework OpenGL" linker flag instead
of linking against the absolute path library.
To convince CMake to do that, we have to create a wrapping
OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES
property.
So create a FindWrapOpenGL find module to do that on darwin platforms.
Adjust helper.py and our build system to use it.
This tangentially amends 38cd18384f
because it recreates the FindWrapOpenGL module, but for a different
purpose.
Task-number: QTBUG-85240
Task-number: QTBUG-84781
Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Q_OS_MAC is not defined when building wasm on mac, so we need
to use a runtime check.
Pick-to: 5.15
Change-Id: I1e9c5ec4e11aae94c9d8e918b5f1f1526723c782
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Closing it early means the user may get this message when reading data
without checking for error:
'QIODevice::read (QNetworkReplyWasmImpl): device not open'
Change-Id: I377fc3da68e9d9f14f8504ace5addbb4f8e3c539
Fixes: QTBUG-85176
Pick-to: 5.15
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This fixes key lookups with different keyboard layouts
Pick-to: 5.15
Fixes: QTBUG-84494
Change-Id: I18f1643331961d9bfc1ac6977181f8959e76449d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The thread specific QThreadData is currently referenced as a thread_local
variable and using a thread specific value via pthread_setspecific.
Having both is not necessary, as the pthread value is never directly accessed
and only used in the pthread destructor. Using a holder, we can achieve the same
and get rid of the pthread handling altogether.
This also fixes a bug, where the thread_local currentThreadData is already null,
when entering the pthread destructor. In this case it would lead to a new QThreadData
being created, when finishing an adopted thread.
Pick-to: 5.15
Change-Id: Ib23b840f804637e6b7cebd89016672a34a575380
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In a prefix build, this function uses install(PROGRAMS) which correctly
sets the executable bit. In a non-prefix build, we did file(COPY)
without explicitly setting executable permissions.
Now, we're also setting the executable bit for
qt_copy_or_install(PROGRAMS) calls in non-prefix builds.
Change-Id: I283e9aeed2a23016ee196d83d584a7eaaa5edd66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To be consistent with the Qt6HostInfo package, we're providing paths
without prefix in the variables like QT6_INSTALL_BINDIR.
The full path can be easily obtained by combining the relative path with
the QT6_INSTALL_PREFIX variable.
Also, the value of QT6_INSTALL_SYSCONFDIR was wrong. It usually is
located outside of the prefix.
Change-Id: I0035633a8c1c865d86d5ffc8b36565ceb2e7ea25
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This package is supposed to be loaded when cross-building Qt from the
host Qt installation prefix. It provides information about the host Qt
by setting various variables. The information reflects what "qmake
-query" of the host Qt would return.
All provided variable names begin with "QT6_HOST_INFO_".
Change-Id: Id568923a318d6e3b48c450663519a3727f615a8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The Qt macOS event dispatcher defers modal session cleanup until
the next runloop pass. But as it stood, we never did do so for
stand-alone qApp->processEvents() calls. The result was
that a NSModalSession would be kept alive longer than necessary, which
would impact the activation state of other QWindows.
Change-Id: I054f3084132c9d20a29a3f5823c19b7123ef40bf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This uses sed -E (extended regular expressions) to improve readability of
regular expressions. Shouldn't be a problem on most modern systems.
Change-Id: I12c9834c1ef83bf5f8547bccff655a6b8525cc3d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>