Commit Graph

46568 Commits

Author SHA1 Message Date
Volker Hilsheimer
ab6861b01f Fix delivery of MouseMove events to newly opened popup windows
Amend d934fd7f54, which was too naive in
assuming that any change to the popup stack while a popup had been
pressed into should result in mouse move events to be delivered without
buttons.

Instead, add a new flag that is set explicitly when the qt_popup_down
widget is closed, and remove buttons from the move move events only when
that flag is set.

Add the sorely missing test case as well, even if we have to accept that
not all behavior can be tested reliably. Ie. on macOS, the simulated
mouse event differs from the event we do get from the QPA plugin or the
system; on Xcb, some of the behavior depends on the window manager.
This is something we could try to clean up for Qt 6.

Change-Id: Ibf0a0a6fb7d401915057365788947e5a35aa20c3
Fixes: QTBUG-84926
Task-number: QTBUG-82538
Pick-to: 5.15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-07-01 14:52:49 +02:00
Timur Pocheptsov
37d9e44cd0 QSslConfiguration::setCiphers - introduce the overload taking QString
We had such an overloaded version in QSslSocket, it was deprecated without
providing any alternative. Now this function has some use and may be
introduced in Qt6, as QSslConfiguration::setCiphers(const QString &).
Last but not the least - a useless and strange auto-test was removed
(it was creating a list of 5 QSslCiphers each with isNull() == true).
That's becasue '!MD5' or 'ALL' (for example) is not a cipher to be found
in supportedCiphers.

Change-Id: I47eb4c0faa9b52885e883751dd992cd9cb3d26fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-07-01 11:26:15 +02:00
Joerg Bornemann
4fbb040f75 CMake: Hard-code QT_CONFIGURE_CROSSBUILD to 0
The qmake we're building is always built for the target platform.
Therefore, QT_CONFIGURE_CROSSBUILD can always be set to a falsy value.

Change-Id: I0f03c4ce0c75d3b4e97be5141adf742276131dcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-01 11:22:46 +02:00
Alexandru Croitor
fb55e1e71e Sql: Fix heap-user-after-free for globally initialized db objects
Becaues the database objects were created as globals, there was a
possible use-after-free issue when deleting the objects on application
exit.

Move the initialization of the database objects into static variables
inside the test constructor.

As a drive-by, also add one missing test to the CMake projects.

Fixes: QTBUG-85357
Change-Id: I2c8f2c5daee96bb9d1d21dae37950a2da5ffdf27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:57 +02:00
Alexandru Croitor
a046833176 CMake: Enable bitcode when targeting UIKIT aka iOS
Building an iOS app with qmake failed because Qt itself was not built
with bitcode enabled.

Enable building with bitcode.
Make sure qrc resource files and bundled 3rd party libraries also
build with the regular Qt module flags and thus with bitcode enabled.
As a consequence gc_sections has to be disabled for UIKIT platforms.

Task-number: QTBUG-82581
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I15fe668725a139c02f2a32a5db849b46d4ce325c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-07-01 10:03:54 +02:00
Alexandru Croitor
36b0d9b51c CMake: Use target install prefix for MODULE_BASE_OUTDIR
When building qtbase for iOS with CMake, and then trying to mix build
qtsvg with qmake, the value of MODULE_BASE_OUTDIR was wrongly set
to the host prefix because that usually coincides with the target
prefix when doing builds with just qmake.

That is not the case for CMake builds, where the host and target
prefix locations are necessarily different.

This caused syncqt to place the forwarding headers inside the host
prefix location instead of the target prefix location, and thus
compiling qtsvg files failed.

Make sure to use the target install prefix instead of the host one.

Task-number: QTBUG-82581
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I592be0b2799c72c11497c8adc12be13106082cfc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:50 +02:00
Alexandru Croitor
e9200ce4b0 CMake: Use non-sanitized plugin type names in .pri files
This is required for qmake to correctly pick up and use plugins that
have strange characters in the types (slashes for platforms/darwin
type and dashes for wayland plugin types).

This fixes some issues with trying to build an iOS application
using qmake due to the qiosnsphotolibrarysupport plugin.

Task-number: QTBUG-85240
Task-number: QTBUG-84781
Task-number: QTBUG-82581
Change-Id: I94faf2d3dbbdeb22dbd96dfb11c7bff00645b524
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:47 +02:00
Alexandru Croitor
3ac50d2f71 CMake: Specify Prefix in target_qt.conf for non-prefix builds
The EffectivePaths section does not inherit the Prefix value from
the Paths section.

Specfiy it explicitly, otherwise the paths reported by qmake -query
for /get variants ended up containing an extra "./bin/" part, which
ended up breaking building iOS apps with qmake.

Amends d7fd684861

Task-number: QTBUG-85240
Task-number: QTBUG-84781
Task-number: QTBUG-82581
Change-Id: I288a6e76a21d779a7e03443777f8a4ce28df9974
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:43 +02:00
Alexandru Croitor
868c7016e0 CMake: Use correct framework link flags in scripts and .pri files
target_link_libraries expects a quoted string like
"-framework CoreFoundation" when linking frameworks and not 2
different arguments like "-framework" "CoreFoundation".

Fix that in the FindWrapOpenGL and FindGLESv2 find modules.

Make sure to not quote the framework link flags when generating
.pri files even if there are spaces, otherwise building apps
with qmake fails.

Amends 7fcc9cf055
Amends 2ed63e587e
Amends 55a15a1c1b
Amends 2a767ab4bb

Task-number: QTBUG-85240
Change-Id: I66ba36760ad704d65e712072a528d9e25c336dfa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:38 +02:00
Alexandru Croitor
1685b0540d CMake: Fix top-level .prl file generation
Promotes qt_find_package()'d targets and their transitive dependency
targets to global scope. This will allow .prl file generation to
access targets in a sibling repo scope.

Retrofits qt_collect_libs() to be a bit more general, so it can be
reused both for prl lib collection, and traversing of dependencies
of qt_find_package() provided targets.

Removes the bail out checks for top-level static builds.

Amends 8c8c0f65e3
Amends dde11715d3

Task-number: QTBUG-84874
Fixes: QTBUG-84917
Change-Id: Id95b4cb7a0887c52f35c40bfdb96ad4a68dd6794
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:32 +02:00
Volker Hilsheimer
980795dc55 Let QScreen::grabWindow's winId parameter default to 0 and add test
The platform plugins are implemented to grab the entire screen if
no window ID is provided. They do not grab the entire virtual
screen, just the screen the method is called on.

On macOS, the implementation ignored the window parameter, and
always grabbed the entire virtual screen. This change fixes the
cocoa implementation. The test passes in local tests (with two
displays with different dpr). Since grabbing a screen returns an
image with managed colors, we need to convert it to sRGB color
spec first, otherwise displaying a grabbed image will produce
different results. This will need to be changed once Qt supports
a fully color managed flow.

The test does not cover the case where a window spans multiple
displays, since this is generally not supported at least on macOS.
The code that exists in QCocoaScreen to handle that case is
untested, but with the exception of the optimization it is also
unchanged.

Done-with: Morten Sørvig <morten.sorvig@qt.io>
Change-Id: I8ac1233e56d559230ff9e10111abfb6227431e8c
Fixes: QTBUG-84876
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-01 07:09:24 +02:00
Shawn Rutledge
836c0b5a24 Make QDebug operator<< polymorphic for QPointingDevice
At least it will look polymorphic by doing dispatch internally.
Adding pointingDeviceType avoids the need for qobject_cast,
and will probably also be useful in other contexts.

Change-Id: I3b6d13765bdf3add9a8208de6f0e98018e40cc42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-01 06:53:14 +02:00
Friedemann Kleint
acbe4190e9 Move the EDID parser into QtGui
As a drive by, fix recursive inclusion in qxcbscreen.h.

Task-number: QTBUG-83255
Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-01 00:46:59 +02:00
Liang Qi
b92a41ea21 xcb: increase XCOORD_MAX to 32767
Align with int16_t in xcb_create_window() and xcb_get_geometry_reply_t.

Fixes: QTBUG-85275
Pick-to: 5.15
Change-Id: Ibbc0fab6b3d725a96ac4545857a4f04b026c4175
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-30 21:41:30 +02:00
Giuseppe D'Angelo
16a5206c78 QLoggingRegistry: remove an always true test
idx has already been tested for being >=0, so it's pointless
retesting it.

Change-Id: I2f5d7e1b7a70097de2601c1ed83752f6aa707cd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
b1ec50c96d QByteArray::insert: do not assert that pos must be non-negative
The insert() overloads have generally a very wide contract. The very
next line accepts negative positions, so remove the related assert.

Change-Id: I89b67615c59287825942047a28572bf896cf30e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
5fa016f284 QUrl: do not retest if a codepoint is less than 0xFFFF
It's already tested in the surrounding if.

Change-Id: I37e13406cfd4865731ce06ed097c03294a75c592
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
6ed9b484da QRgba: code tidies
Fix the signature of an assignment operator.

Change-Id: I125c0129bb2607e5d8beb932da843a0393f2cfeb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-06-30 18:54:57 +02:00
Tor Arne Vestbø
9db36a7143 glx: Pull out screen numnber from GLXFBConfig instead of QXcbScreen
Change-Id: I6b87bb1c3c501613bc147c5f88e0f2d2222b0a50
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-30 18:54:57 +02:00
Tor Arne Vestbø
69d581736c glx: Remove assumption about supporting multiple displays
We only support one display (X server connection), so there's no reason
to have the user pass in the display. We can always use the one we know
from the QXCbScreen (which also matches the QXcbIntegration connection).

Change-Id: Ifc43dac4c74ba16490d3dee25fc3d43ee053a7d5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-30 18:54:57 +02:00
Laszlo Agocs
bed8c5d678 Switch to qvla where it makes sense in rhi
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: I48aedf143e221dc178d661e23454d1e4fb7a271b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-30 15:24:43 +02:00
Dimitrios Apostolou
60666ed2fa Update configure flags to the last fixes
The following options now work:
  -ccache
  -nomake examples
  -nomake tests
  -no-pch

Furthermore -no-optimize-debug is not used in the CMake build,
all -debug builds are without optimizations.

Change-Id: I53abd62083f3bb61f15efe79729cf541515c0a4c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-30 15:21:32 +02:00
Dimitrios Apostolou
013b04a381 Fix configure -cmake -no-pch
Since the CMake build of Qt needs a special flag (BUILD_WITH_PCH)
we need to detect -no-pch separately in the configure script.

Change-Id: If31e129ba532c00a7e0a7ee817dec6a6a0138ebf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-30 15:21:21 +02:00
Dimitrios Apostolou
31ae43f875 Install and enable pkg-config on macOS
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>
2020-06-30 15:21:14 +02:00
Dimitrios Apostolou
04e1ae2308 Do not mix CCache artifacts between similar versions of same OS
+ 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>
2020-06-30 15:21:05 +02:00
Timur Pocheptsov
d81d3d5f92 QMacStyle - stop using the deprecated API
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>
2020-06-30 13:37:26 +02:00
Samuli Piippo
b3146d2bb8 Use std::memmove
... and add include for it.
Amends ffb73175e6

Change-Id: I709a5aed13f6f62017b9e4116a03a4dfaae4bb13
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-06-30 14:30:19 +03:00
Alexandru Croitor
e932a898a5 CMake: Adjust some status messages about syncqt and file generation
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>
2020-06-30 13:15:14 +02:00
Alexandru Croitor
108fb2f197 syncqt: Make sure to update forwarding headers if they are stale
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>
2020-06-30 13:15:11 +02:00
Laszlo Agocs
18eb51b813 Switch to qvla where makes sense in opengl
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>
2020-06-30 13:01:35 +02:00
Shawn Rutledge
f1ccccb7dd Fix formatting in QDebug operator<< for QPointingDevice
It was missing some spaces.  Now looks like
 QPointingDevice("Wacom Intuos3 6x8 Pen stylus", type=Stylus, id=b, seat=30002, pointerType=Pen, capabilities=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt, maximumTouchPoints=1, uniqueId=4c00079)

Change-Id: I4a8203a2a5ee1f8c5c53a6a85b40ec1d25a3c2c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-30 12:59:10 +02:00
Tor Arne Vestbø
a5c6329829 Pass correct modifier to QCocoaKeyMapper::toKeyCode()
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>
2020-06-30 12:58:33 +02:00
Tor Arne Vestbø
3021b1ecb7 Simplify QCocoaKeyMapper by always returning a valid keymap
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>
2020-06-30 12:58:32 +02:00
Tor Arne Vestbø
d962de314b macOS: Modernize QCocoaKeyMapper
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>
2020-06-30 10:11:23 +02:00
Nico Vertriest
d0ccacaf28 Doc: Update docs with cmake package information
Task-number: QTBUG-85179
Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-30 10:11:23 +02:00
Tor Arne Vestbø
c36fb76bed Fix warning about missing QT_BEGIN_NAMESPACE in qsimd.h
Change-Id: I80d5ec671b08e74856b27922b10e0b31007a62c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 10:11:23 +02:00
Thiago Macieira
4e2f467036 forkfd: remove FFD_VFORK_SEMANTICS
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>
2020-06-30 08:11:23 +00:00
Tor Arne Vestbø
ae28fbd8cc Fix QShortcutMap::createNewSequences debug logging
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>
2020-06-30 10:11:23 +02:00
Jarek Kobus
9fa3cf15c8 Use QList instead of QVector in gui
Applied to headers only. Source file to be changed separately.

Task-number: QTBUG-84469
Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-29 19:19:47 +02:00
Jarek Kobus
c70c4e4266 Use QList instead of QVector in corelib docs
Task-number: QTBUG-84469
Task-number: QTBUG-85221
Change-Id: Ieb0ba7d82409e3c053a5788a01e92ea495505643
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-29 18:00:13 +02:00
Alexandru Croitor
f3c7d22dd0 CMake: Don't use libraries in /usr/local by default on macOS
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>
2020-06-29 17:34:22 +02:00
Timur Pocheptsov
45c0f45e04 Move QAlertLevel and QAlertType enums into the namespace QSsl
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>
2020-06-29 17:08:13 +02:00
David Faure
eb54646984 Fix QUrl::toDisplayString(PreferLocalFile) returning an encoded path
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>
2020-06-29 16:45:31 +02:00
Tor Arne Vestbø
76f45e6e97 Remove leftover QT_WARNING_POP
Amends ab1e0961d4.

Change-Id: I460d650e70dc5635cb377569aa976f11fc206d63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-29 16:31:32 +02:00
Albert Astals Cid
ee6aadcff4 QByteArray::operator[] no longer resizes
Fix the documentation

Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-06-29 13:24:11 +02:00
Joerg Bornemann
943340222e CMake: Generate qdevice.pri when cross-building
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>
2020-06-29 12:47:59 +02:00
Joerg Bornemann
8df4caf554 CMake: Allow to pass a custom target mkspec name
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>
2020-06-29 12:47:53 +02:00
Joerg Bornemann
5ccecd3a89 CMake: Write host architecture and ABI to qconfig.pri
...when cross-building Qt.

Change-Id: I7d2fe83167fc278fde9f0c0fd70f5fa42fa62862
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-29 12:47:44 +02:00
Joerg Bornemann
2299b61d0c CMake: Write gcc sysroot flags to qconfig.pri
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>
2020-06-29 12:47:39 +02:00
Joerg Bornemann
d7fd684861 CMake: Support cross-compilation with qmake
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>
2020-06-29 12:47:34 +02:00