Use _qt_internal_generate_android_qml_deployment_settings from
QtQml module when generating corresponding Android deployment
settings.
Task-number: QTBUG-97795
Change-Id: Ib509160e841fde98e818b0758bdfaff421dbc259
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fixing documentation and removing tests.
[ChangeLog][Important Behavior Changes] The qNextPowerOfTwo()
functions now have preconditions.
Change-Id: If6d5e8bee66826910e89be7cac388a1f0422ebfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I3fcb1de9487bfdfab16bae5603fed09ef72e01ba
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
More mindless coding-style conformance. Includes moving & or * to
after the space, not before, in declarations; and spaces after commas.
Change-Id: I221fef1e4de69d6c55d33dfc533aa74e2fd72df0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With one exception: in a macro-definition with a backslash-newline
immediately following the open-parenthesis.
Change-Id: I0fc8d7492676402636785d571e4667881334af6a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Simply if (!condition) QSKIP(...) instead of having a long block
depend on the condition with the QSKIP() in its else block (which
should have had braces, as it was).
While dedenting the code block, tidied up spacing: only include blank
lines where they break up the code into blocks that go together, don't
leave spaces just inside parentheses.
Change-Id: I0196150088be88a7c6073b997a315b8f14d5f392
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Use QVERIFY() rather than comparison to true; QVERIFY() the negation
rather comparing to false; prefer QCOMPARE() otherwise for
comparisons, except for a few special cases involving very long
strings. Fix up the phrasing of a few QSKIP()s in the process.
Also, QCOMPARE() can handle an enum as expected value without
int-casting.
Change-Id: I9a1b82e5f4e10df6427bcc184b7757737df7db4f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
In some cases by adjusting where the splits happen within concatenated
strings.
Change-Id: I4cffc41cda4582654151ba45d1478285caee7c81
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Prefer pre-decrement over post-decrement, turn a while into a for,
Don't put a while's body on the same line.
Change-Id: I5653a9bcec7901d205a91927c4b08e3dc13e0ca6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reflowed some over-long ones, fixed some typos, capitalise starts of
sentences (and end them with suitable punctuation). Removed one as
redundant, made another pair redundant by changing the code (use an
overt NaN instead of commenting that it's happening). Prefer C++-style
when single-line. Don't pretend to be QDoc comments, or have other
eccentricities about start-markers.
Change-Id: I5a30e1b22a08866124f09060bb35f5bd27cd443b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Much of the test code simply had a blank line after each check. Keep
the ones that separate groups of related statements, but remove the
ones that separated members of such groups. In some cases swap a blank
line and a code line to put the code with things it relates to.
Change-Id: Ie33863080d407898b2b2f044599398980ab9793d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Split some long declarations of two variables in one line into two
separate declarations. Made more things const, made some consts
constexpr. Skip a variable entirely when it's only used once (and not
giving us some other benefit). Moved some declarations closer to their
variables' first uses.
Replace some Capitalised variable names with lower-case ones.
Change-Id: I3b8dac46530ba1c2e6100cb007b5487253304526
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
It saves the conversion to UTF-16 until the formatting. Split up long
lines, purge spaces just inside parentheses, and otherwise tidy
affected lines. Don't use backslash-newline for line continuation
within string literals; juxtaposition is cleaner.
Change-Id: I9c3d3e33f5ecbdb530538679147f7bc32afbeb05
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
It's terser and cleaner to read. Likewise for
QString::fromLatin1(). QCOMPARE() can take a QStringView, hence u"..."
as its expected string; other uses need u"..."_qs.
Change-Id: Iaf96569ff3ce69c890badfb6e40f702a78b100b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Marc alleges it is more efficient.
Corrected part of a message to be more accurate in the process.
Save some casting by using suitable format specifiers.
Change-Id: Ic31a4e17b8910d35781a494ec860c7a08f08f33b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
When the format is an ASCII string, there's no point widening it to
UTF-16 before the actual formatting step. Also, don't construct the
format string using string arithmetic, when passing another parameter
to arg() will do just as well. In the process, restructured
generic_data(), split long lines and conform spacing to Qt coding
style on affected lines. Simplified initialization of two string
fragments by using QL1S instead of QString, too.
Change-Id: Ib101dcf9296cc532291518bcef8e0a8de597b8a0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
In tst_qguiapplication and tst_qcoreapplication,
the application version should be set. On Android, this
is done using QT_ANDROID_VERSION_CODE.
Pick-to: 6.2 6.3
Change-Id: I6b473ad25092fb24df9400e0ab8fbb8ea4edbb6a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Tests are run for QNX in qemu similar to b2qt currently (using offscreen
plugin and software rendering). So the issue is same.
Pick-to: 6.2 6.3
Task-number: QTBUG-100930
Change-Id: Ie973c6c611ac48703fd7cce53925940b80858bc8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
That only Windows and macOS are supported is mentioned, but deep down in
the description. Let's make it more prominent.
Pick-to: 6.3
Change-Id: Ia34a10f2fcbe0b2f86b5a0c5585277e169b11fa6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The group is not used anymore. It also prevents qdoc to properly put
the variables in the breadcrumb menu (under "CMake Variables in Qt6 Core")
Pick-to: 6.3
Change-Id: I1afe3b1cb7be8dcdda9a6c6e1235e4457800179d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
GTK buttons can be pressed with Space, Return and Enter, so this should
be considered native behavior for GTK based desktop environments.
Qt::Key_Select is also included here because QAbstractButton has been
pressable with Qt::Key_Select for a long time.
Change-Id: I2c279ad05d1a10e5968a18996b8b40a83d2251fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
on Wayland
Task-number: QTBUG-100891
Pick-to: 6.3 6.2
Change-Id: Iadf12364ded4549988ad75a9487c7e96e963a956
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Clang uses arch names directly, and not the "arch=xxx" format of GCC.
Appears we do not use this target though.
Pick-to: 6.3 6.2
Change-Id: I1d295f25fe2278c5c6bc0f617496555e28427bea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Scroll tests relied on having a small window. On Android, the
window can not be smaller than the screen.
This patch changes the tests so that the windows have large
enough content so scrolling can happen.
Fixes: QTBUG-87408
Pick-to: 6.2 6.3
Change-Id: I26a444518fd934527089297c594673937f0ecf88
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The required canvas configuration is an implementation
detail; move it out of the .html file (which we expect
that users will replace), and into the QWasmScreen
constructor.
This also enables using a div element as the container
element (instead of a canvas), since Qt then can create
and configure the canvas during QWasmScreen construction.
Change-Id: Ia849517d00fa3e8ec307065a524c0c91296dd490
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Platforms should allow more than just Qt::Key_Space and Qt::Key_Select
to press buttons. KDE Plasma developers want to be able to press buttons
with Return/Enter. GTK allows buttons to be pressed with Return/Enter,
so this should be considered the native behavior for GNOME as well.
Adding this ThemeHint allows customizing the keys that can press a
button via a QPlatformTheme subclass.
Change-Id: I73284e9b73590fbdd0b94a0cb4557e94b3722af9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
tst_qabstractitemview requires a movable cursor.
This patch skips the test if there is no movable cursor.
Pick-to: 6.2 6.3
Fixes: QTBUG-87400
Change-Id: I4e917b2ad062ce068f23603410aa9209edb9828d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Adapt QToolButton texts to descriptive versions.
Add dummy stylesheet that will be used for all test functions, and a
specific style sheet to test rendering of QToolButton with a menu button.
Task-number: QTBUG-100401
Pick-to: 6.3 6.2
Change-Id: I5440407ddb3ea5b45124e77a6f0d1013362b4398
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The argument to file(GENERATE...) is called CONTENT, not CONTENTS.
Pick-to: 6.3
Change-Id: I22fb9eb966223e034b2606cf24315d3cf6a03df1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use qOffsetStringArray instead of array-of-const-char* to hold
strings. Saves 174 relocations, as well as over 4KiB in combined TEXT
and DATA size on optimized Linux GCC 11.2 C++20 AMD64 builds.
Pick-to: 6.3
Task-number: QTBUG-100536
Change-Id: I5849168d0340f78664e566920f92ad136f9dc435
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Newest version is 4.4 so update it in the git as well
Task-number: QTBUG-98971
Pick-to: 6.3 6.2 5.15
Change-Id: I4b5bd2852c6c2775bd285c6584eb712fd0b73db3
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
If there are no arguments, echo will print its status, and config.opt.in
will contain
ECHO
is
off.
Fix this by using "echo." idiom.
This amends 57ad532e75
Pick-to: 6.2 6.3
Change-Id: I1697e59f23cd28256a4a6ce357eae70e36c49d5a
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
We don't need them.
Drive-by opportunity to ensure byteData() didn't return null. It could
happen.
Change-Id: I74249c52dc02478ba93cfffd16d1e1fc060cdaef
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
value[x] is the same as value.toMap()[x] but avoids the refcounting up
and down just to call the operator[] overload. We're calling the
operator[] overload taking an integer, which means it could match an
array, but we know the data member won't be one because of how
QPluginParsedMetaData::parse() parses.
Change-Id: I2cffe62afda945079b63fffd16bd5c690b2bfee4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- InstantPopup mode is set and
- application uses a stylesheet that does not apply to QToolButton
Task-number: QTBUG-100401
Pick-to: 6.3 6.2
Change-Id: Iadf752ad9280d59763f4efc1938927a9b83e6ad9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Issue introduced by commit 465701bb98.
[ChangeLog][QtCore][QMetaObjectBuilder] Fixed a bug that would cause
addProperty() to use the incorrect type for the property if the
property's name matched a valid type registered with QMetaType.
Pick-to: 6.2 6.3
Change-Id: Ic15405335d804bdea761fffd16d402f2c9611f30
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
QByteArray in Qt 6 *can* hold more than 2GB-overhead of data.
Untestable.
Fixes: QTBUG-100546
Pick-to: 6.2 6.3
Change-Id: I74249c52dc02478ba93cfffd16d1a0ab398efe9c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Bundle a default LaunchScreen.storyboard file for an iOS app and make
sure it's referenced in the generated Info.plist file.
When launching Qt examples, it ensures the app uses the whole screen
space on the device rather than just a square-ish part of it.
The storyboard file is a copy of the qmake one, which qmake adds
to the Xcode projects it generates.
A custom launch screen can be provided either by setting the
QT_IOS_LAUNCH_SCREEN variable or by setting the
QT_IOS_LAUNCH_SCREEN target property.
The value must be an absolute path to the launch screen file.
The automatic addition of the launch screen entry in the Info.plist
file can be prevented by setting the QT_NO_SET_IOS_LAUNCH_SCREEN
variable to TRUE.
The automatic bundling of the launch screen file in the application
bundle can be prevented by setting the
QT_NO_ADD_IOS_LAUNCH_SCREEN_TO_BUNDLE variable to TRUE.
The current implementation has a limitation that only one launch
screen storyboard and one iOS executable can exist within a project.
If there are multiple executables in the project, all of them will
use the launch screen that is specified last (the last
qt_add_executable call).
Because of this limitation, the API is marked as Technical Preview,
to be improved upon in the future. For now it simply serves as an
improvement to the out-of-the-box experience of iOS apps built
with CMake.
Amends 4d838dae5a
Pick-to: 6.2 6.3
Fixes: QTBUG-95837
Change-Id: I6b067d703d635122959a1ef17fcca713da694a86
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>