Commit Graph

63647 Commits

Author SHA1 Message Date
Volker Hilsheimer
c4a8c2b0d0 Silence compiler warning
Don't get a QModelIndex out of a temporary QPersistentModelIndex.

Pick-to: 6.6
Change-Id: Ida9e25f1a17130e19b75221e1189e6f2fccd3f27
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-09-22 20:40:36 +02:00
Alexandru Croitor
bf2587d9e5 CMake: Update the ios assets manual test
- provide an asset catalog .json file for both Xcode 13 and 14
  formats. Apps built against the Xcode 13 SDK are not validated
  anymore by the App store, but it's still useful to see how things
  were before.

- Xcode 13 required the following icon sizes for a universal iOS app:
   60x60@2x, 76x76@2x\~ipad, 167x167, 1024x1024

- Xcode 14 only needs the 1024x1024 one

- icons need to be embedded into the asset catalog starting with iOS
  11 according to Apple docs (not sure which Xcode version, but it's
  needed for both Xcode 13 and Xcode 14), and they don't have to
  manually be copied into the bundle anymore, Xcode takes care of
  that when processing the asset catalog

- add an 167x167 icon image for the iPad pro for Xcode 13

- add an 1024x1024 icon image that is required for successful app store
  submission and embed it into the asset catalogs

- for Xcode 13, we need to manually specify all the required icon
  sizes

- for Xcode 14 we can rely on Xcode to generate the smaller icons from
  the big one

- because the icons need to live in the asset catalog folder, remove
  unnecessary icons in the appicons folder.

- for the cmake project, make sure the asset catalog compiler generates
  the icons by setting the
  XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME attribute
  qmake does automatically already.
  it would be nice if we can do that automatically in a future Qt
  version

- remove unused icon references in Info.plist file with Xcode 13

- remove all icon references in Info.plist with Xcode 14, rely on Xcode
  to add that info via its generated partial Info.plist file that gets
  merged into the main one.

- don't include CMakeLists.txt as a text resource

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I0bc556e66647a66bc21402ea62db3374d0970e97
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-22 20:40:36 +02:00
Alexandru Croitor
370962315a CMake: Fix incorrect UILaunchStoryboardName value in Info.plist
The value needs to be 'CustomLaunchScreen', not
'CustomLaunchScreen.storyboard', otherwise app store validation will
fail with the following error:

 Asset validation failed
 Invalid bundle. Because your app supports Multitasking on iPad, you
 need to include the CustomLaunchScreen.storyboard launch storyboard
 file in you bundle. Use UILaunchScreen instead if the app’s
 MinimumOSVersion is 14 or higher and you prefer to configure the
 launch screen without storyboards.

This brings the value in line with what we have for the qmake
Info.plist file.

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I4e9cc2ed685634544955e967f35fdc426dac0f0c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-22 20:40:36 +02:00
Alexandru Croitor
528e70b6d9 CMake: Add CFBundleIconName key to ios assets manual tests
It is required for publishing an app to the app store. Otherwise during
app store validation phase, you get an error:

 Asset validation failed
 Missing Info.plist value. A value for the Info.plist key
 'CFBundleIconName' is missing in the bundle 'foo'. Apps built with
 iOS 11 or later SDK must supply app icons in an asset catalog and must
 also provide a value for this Info.plist key.
 For more information see
 http://help.apple.com/xcode/mac/current/#/dev10510b1f7.

Note this is not needed when using Xcode 14.3+ and when one places the
icons into an asset catalog. When processing icons in the asset
catalog, Xcode generates a partial Info.plist file that will contain
the CFBundleIconName key and will merge into the final Info.plist
file.

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I53009097cf27b096c72ee9c4bad6aa4286272061
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-22 20:40:35 +02:00
Rym Bouabid
a0bd124a56 Revamp MIME Type Browser Ex: Revisit documentation
Remove "Example" from the title.
Add \examplecategory {Data Processing & I/O}.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: I6004f6708299886d6423325a551a9fd03a4a57df
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:23 +02:00
Rym Bouabid
e6c8c16afb Revamp MIME Type Browser Ex: Replace QObject by Q_DECLARE_TR_FUNCTIONS
When declaring MimetypeModel class, use Q_DECLARE_TR_FUNCTIONS Macro
instead of Q_OBJECT as we only need to call tr() functions.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Ic7afd4a806d57ba2a651ebe129f3a91f35764354
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:23 +02:00
Rym Bouabid
00d8d566c6 Revamp MIME Type Browser Ex: Fix includes
Fix include order to respect the Coding Conventions.

Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Iba7a4726180ec97d9654ed3b934baca8c1df0b5c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:22 +02:00
Rym Bouabid
81857ad5c3 Revamp MIME Type Browser Ex: Fix too long lines
Fix code lines that do not respect the 100 characters limit rule.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: I9833e9a25a09833b3e0384c95af8a422d5aa4582
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:22 +02:00
Tor Arne Vestbø
a0792da126 xcb: Work around GCC ABI issue causing warning on ARM
In member function ‘virtual QDpi QXcbScreen::logicalBaseDpi() const’:
 qxcbscreen.h:139:42: note: parameter passing for argument of type
 ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
     QDpi logicalBaseDpi() const override { return QDpi(96, 96); }

It's not possible to silence this warning/note using pragmas.

Pick-to: 6.6 6.5 6.2
Change-Id: I913a1753ce0c82ac17951faa58b0a88bf1daa4db
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-22 20:08:05 +02:00
Morten Sørvig
0e23865c9e wasm: Improve screen cleanup
Fix the use case where the application recreates the
QApplication object while reusing the html container
element. This would cause an error:

  Uncaught DOMException: Failed to execute 'attachShadow' on
  'Element': Shadow root cannot be created on a host which
  already hosts a shadow tree

It looks like there is no way to remove a previously
attached shadow root, which means we can't return the
container element to its initial state if we attach
to the user-provided container element.

Fix this by introducing an intermediate element which
we can remove() in the QWasmScreen destructor.

Pick-to: 6.6 6.5
Change-Id: I929393a498b0440390a3e2c1774a3cac3a5a7e79
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-09-22 16:51:43 +00:00
Leena Miettinen
201c30986b Doc: Edit CMake Qt6 Core variable docs
Edit the docs for style and consistency.

Pick-to: 6.6.0 6.6 6.5
Change-Id: I24fb7f8b833ae7e5adaca31811bd171d892c5907
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-22 17:44:27 +02:00
Kai Köhne
868b721246 Remove unused snippets/rsslisting files
The snippets from the files were used in the QXmlDefaultHandler
documentation that got moved to qt5compat in Qt 6 (commit
79e0374143).

Change-Id: I11f19c8b2c5f693e203925bd2b19cff8d3380580
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-22 15:44:27 +00:00
Alexey Edelev
bfe62b0224 Remove framework-related functionality from syncqt
The files generated by syncqt should land not only in module include
directory, but also in framework directory. Before syncqt made two
copies of the generated files one in staging directory and the second
one in module framework directory. This commit moves all logic related
to framework header files to cmake scripts. This is done for both
consistency and simlifying the logic. The whole module .syncqt_staging
directory is copying to the framework library in cmake.

[ChangeLog][Tools][syncqt] '-framework' and '-frameworkIncludeDir'
arguments were removed. The related logic is moved to cmake scripts.

Task-number: QTBUG-116483
Pick-to: 6.6 6.5
Change-Id: If79c5470d2ab51eb7fc083bce6fb01858bed76ba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-22 17:44:27 +02:00
Marc Mutz
aa19704bbc Un-deprecate qSwap()
It seems to have fallen prey to the mass-deprecation of <QtAlgorithms>
in Qt 5.2. Since it didn't actually duplicate STL functionality, that
was uncalled-for: Unlike std::swap(), it's ADL-enabled, so the docs
were wrong to suggest replacing it with std::swap instead.

In fact, the tony-table that 5957f245c6
added to qalgorithms.qdoc didn't include qSwap(), yet, qSwap() was
marked as deprecated.

Un-deprecate and expand the discussion to more faithfully represent
its value, without going into the depths of teaching how to swap
correctly in C++ (link to boost.org and cppreference.com for that
instead).

Remove the example that used qSwap() on doubles, which is precisely
_not_ how you should use it.

Amends 5957f245c6c77c98d7e90d614c9fe2cdbfe7e8e6(!).

[ChangeLog][QtCore] Un-deprecated qSwap().

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I4981005ba71b0d1824f2a46897145255fa66a7ea
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-09-22 15:54:31 +02:00
Alexey Edelev
42d2944191 Add coverage and coverage-gcov features
Features enable code coverage collecting using the gcov tool. The
resulting reports can then be post-processed by lcov or similar tools.

[ChangeLog][CMake][Coverage] Added the coverage configuration argument.
The only supported coverage tool at the moment is gcov. The argument
requires Qt is built in Debug otherwise setting the argument leads to
the configuration error. Typical usage:
  <...>/configure -developer-build -coverage gcov

Task-number: QTBUG-86223
Change-Id: I39b2061f544997a7c4fe6f4d135c0ab447f15a17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-22 15:54:30 +02:00
Kai Köhne
f2ec221bd6 Make examples/bindableproperties a proper project
Both executables (subscription, bindablesubscription) are documented
as one project. Make sure that e.g. Qt Creator can also load this
project.

Fixes: QTBUG-117109
Pick-to: 6.5 6.6 6.6.0
Change-Id: I3912f2f76379940b02f3a57a7a55440a30366755
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-22 11:24:16 +02:00
Kai Köhne
ec32748b1e Doc: Fix location of QT_REQUIRE_VERSION documentation
<QMessageBox> is not a (separately documented) header. QDoc
therefore puts the documentation on a separate proxy page:

https://doc.qt.io/qt-6/qmessagebox-proxy.html

Fix this by actually linking to the type.

This amends  95a3f85a2f, which moved the macro from
QtGlobal to QMessageBox.

Pick-to: 6.5 6.6
Change-Id: Ia2ed3d9fd786732c85d731634ff79afefe42333b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-22 09:24:16 +00:00
Volker Hilsheimer
cf0bd543d6 QJniObject: add callStaticMethod overload that takes class as type
Equivalent to get/setStaticField.

Add a test, and tighten up the surrounding test code a bit.

Change-Id: Ic0993c5d6223f4de271cb01baf727459b5167f94
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
2023-09-22 07:18:21 +02:00
Volker Hilsheimer
e1a349983c JNI: move signature/className template functions into a template class
Template functions don't permit partial specialization, e.g. we cannot
specialize typeSignature() to return an array signature for any
std::vector or QList type. We need to do that for better array support,
so move those functions as static members into a template class, which
then can be specialized.

Since submodules are both calling and specializing typeSignature and
className as template functions, keep and use those until the porting is
complete.

Change-Id: I74ec957fc41f78046cd9d0f803d8cc9d1e56672b
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-09-22 07:18:16 +02:00
Volker Hilsheimer
0022b05a9a JNI: rename our compile-time String type to CTString
The type lives in the QtJniTypes namespace, which is where types end up
that are declared through the Q_DECLARE_JNI_CLASS/TYPE macros. Having a
String type in that namespace prevents us from declaring the Java String
class as a QtJniTypes type, which is silly.

Perhaps this type becomes obsolete at some point with std::string being
a constexpr type in C++23, but until then we need it. It has no ABI, so
renaming it us safe.

Until submodules are ported, leave a compatibility alias String type,
which also prevents us from declaring a String JNI class in tests until
the alias is removed in a later commit.

Change-Id: I489a40a9b9e94e6495cf54548238438e9220d5c1
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
2023-09-22 07:18:10 +02:00
Volker Hilsheimer
dc126de22e QItemSelectionModel: don't warn when destroying the model
Amends 4f4a8e75ab, after which
QItemSelectionModel printed a warning when destroying the model.
We reset the selection model in response to the model getting destroyed,
and since the model is already set to be nullptr at this point the
select() function complains about changing the selection with no model
set being a no-op.

Fix this by not calling reset() when the model gets destroyed - the
stored selection and currentIndex are already reset at this point -
and instead only call reset() when a new model is set in initModel.

Fixes: QTBUG-117200
Pick-to: 6.6.0 6.6 6.5 6.2
Change-Id: I12fc6b3fb2f2ff2a34b46988d5f58151123f9976
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-09-22 01:42:45 +02:00
Aleix Pol
52a5a89ea4 QCommandLineParser: Warn invalid value calls
If the QCommandLineOption doesn't have a valueName, the parser won't
read the argument, therefore returning an empty value. If the developers
are calling ::value on the option, they clearly think it's expected to
get a value but won't ever be getting one, so we better warn them about
it.

Change-Id: I434b94c0b817b5d9d137c17f32b92af363f93eb8
Reviewed-by: David Faure <david.faure@kdab.com>
2023-09-21 22:05:06 +02:00
Marc Mutz
64c50224b9 Port qSwap()'s exception detection to C++17 std::is_nothrow_swappable
It's been available since C++17, and since we compile the trait
anyway, using it will probably speed up instantiation of qSwap()
(didn't test, just guesstimating).

Change-Id: If77ca71a8021a73edf4864bdd9e5fce517dcabb1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-09-21 22:05:06 +02:00
Marc Mutz
9d70118c66 qswap.h: include what you need
The qSwap() function needs std::swap, so include <utility> manually
instead of relying on transitive includes.

Pick-to: 6.6 6.5
Change-Id: If1331e1eabb55542eac7477522a8e906efb5379f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-09-21 22:05:05 +02:00
Marc Mutz
0bd3e28b17 qswap.h: use a more robust include guard
Just "QSWAP_H" is a bit meager to be unique. We don't really have a
monopoly on q-prefixed function and header names, there's the C std
function qsort(), e.g...

So use a somewhat more unique name as header guard.

Pick-to: 6.6 6.5
Change-Id: I554fa224afcb6858b752e8044ef3c03dfc69c084
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-09-21 22:05:05 +02:00
Marc Mutz
88a109bede qswap.h: remove stale comment
It's now documented in qswap.qdoc.

Amends 9c706e2567.

Pick-to: 6.6 6.5
Change-Id: If6138df419dee165e9f1de4c0a0d68af1dcfaa42
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-09-21 22:05:05 +02:00
Joerg Bornemann
814de4c2ce CMake: Fix config condition evaluator
Use recursive descent to handle parentheses in config condition
expressions. This fixes cases like 'NOT (A AND B)'.

Fixes: QTBUG-117053
Change-Id: Iab1b6173abe00d763808bb972a9a5443ffa0938d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-21 21:46:46 +02:00
Joerg Bornemann
49ff83fcef CMake: Use while instead of foreach in qt_evaluate_config_expression
By using a while loop instead of a foreach(RANGE), we can simplify the
code and remove the skipNext variable.

Also, we need to access the last used iteration index in a future
commit. This is not possible with a foreach loop without saving the
index in another variable.

Change-Id: I39306a0105fb31a6a8f39e9d4c47ee3424599a2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-21 21:46:46 +02:00
Joerg Bornemann
f5fc45bcb4 CMake: Remove superfluous code from qt_evaluate_config_expression
All of the continue() statements are not needed. There is no code after
the if-else chain.

Change-Id: I16188d14b4f05cb1e5f29bac4657149c4fce60a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-21 21:46:46 +02:00
Kai Köhne
5bfac5358a Doc: Improve documentation for QMetaEnum::metaType()
Rephrase hard-to-read sentence.

Replace 'integral type;  with 'numeric type', as this seems
to be the terminology in the standard:

  The type-specifier-seq of an enum-base shall name an integral type

Finally, no need to use \sa for a method that is mentioned right before.

Pick-to: 6.6
Change-Id: I543041e78cc09ccd58182db454880941592c74ae
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-09-21 21:29:21 +02:00
Kai Köhne
802db7b523 Move rsslisting documentation to common dir
Move the rsslisting example documentation to examples/network/doc,
as it is done for all the other examples.

Fixes: QTBUG-117215
Pick-to: 6.5 6.6
Change-Id: If83202825afe8c69cb7fda0f84ca4832cf3d60e7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-21 19:29:20 +00:00
Nicholas Bennett
e7847a3258 Docs: Update Links to Android Notifier Example
Added to the list of important links on the Android Platform home page.

Task-number: QTBUG-116780
Pick-to: 6.2 6.5 6.6 6.6.0
Change-Id: Id65a73d56bff0b288ebb1da098f6dbd8cbbe606e
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-09-21 17:28:43 +00:00
Alexandru Croitor
db17465d37 Fix reported QtCore copyright year
Pick-to: 6.2 6.5 6.6
Fixes: QTBUG-101162
Change-Id: I09df1e19d353ab93fb0042b2fa9a68c89d8a5399
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-21 19:28:43 +02:00
Tatiana Borisova
b856790d67 Add Q_ENUM macros for registering QSsl/QSslSocket in Meta-system
- Macros provide possibility to use enums in QML via QtNetwork QML module

Task-number: QTBUG-115056
Change-Id: I1ed96a7eb4b12681d16137528307fec6db5b016c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-21 19:28:43 +02:00
Morten Sørvig
8bfdfd613e wasm: include qunixnativeinterface.cpp in build
Fix shared libraries build error:
  undefined symbol: _ZN16QNativeInterface7Private14QWaylandWindowD0Ev

We are declaring QWaylandWindow for all Q_OS_UNIX in
qplatformwindow_p.h, and must include the definition
as well.

Change-Id: I630538af475524659e9a476171994e600f2ec668
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-21 19:28:42 +02:00
Volker Hilsheimer
6c90aa029b QDockWidget: ignore close event if DockWidgetClosable is not set
[ChangeLog][QtWidgets][QDockWidget] A floating dockwidget that doesn't
have the DockWidgetClosable feature flag set can no longer be closed by
a call to QWidget::close or a corresponding keyboard shortcut (such as
Alt+F4).

Fixes: QTBUG-116752
Pick-to: 6.6 6.5
Change-Id: I7859a2eed11f0e4ee013f7f56611e282e9bcae9a
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-21 18:36:06 +02:00
Simo Fält
f07efb4819 CI: Enable changing chroot in platform config for Debian packaging
Allows us to change the target distro through platform configuration
yaml file.

Pick-to: 6.6
Task-number: QTBUG-117120
Change-Id: Ie6e99e4b25198e27491e6191f57d77dbbe3c4eed
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 798175930e517e28230e3db3213510a22a041620)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-21 16:16:46 +00:00
Joerg Bornemann
ff6eca0087 CMake: Add I18N_NATIVE_LANGUAGE keyword to qt_standard_project_setup
[ChangeLog][CMake] Added variable QT_I18N_NATIVE_LANGUAGE to specify the
native language that is used in the source code for translatable
strings.

[ChangeLog][CMake] Added keyword I18N_NATIVE_LANGUAGE to
qt_standard_project_setup to conveniently set QT_I18N_NATIVE_LANGUAGE.

Task-number: QTBUG-115845
Change-Id: I079256507685afe5eccda78beffff819292494bf
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-21 17:00:22 +02:00
Joerg Bornemann
36e043dde6 CMake: Add autotest for the config condition evaluator
This serves as regression test for future fixes of the config condition
evaluator.

Task-number: QTBUG-117053
Change-Id: Ib05fe5f5fb6aa2d440ecbc8affaf99b040553c06
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-21 17:00:22 +02:00
Andreas Holzammer
86eb1f4413 eglfs: Extend GBM surface creation probing
Some graphics drivers do only create a surface with the help of
gbm_surface_create_with_modifiers and others do require to use
gbm_surface_create. So it is needed to probe these.

Change-Id: I9ea657f12f2ea23ec426a378cfd67e297cb2d310
Pick-to: 6.5 6.6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-21 08:58:09 +02:00
Tor Arne Vestbø
0bfb25d178 Remove QShortcutMap::matches() and use QKeySequence::matches() instead
The custom matching function was added in 4d4857027db3 with the rationale
that people were mixing up Key_hyphen and Key_Minus all the time, and
tried to solve it by treating the two as one and the same in the match
function.

Unfortunately this doesn't work in practice, as when a keyboard event
comes in we resolve a set of possible key sequences from that, and then
look those up in the list of sorted shortcut sequences. That lookup
is just a binary search, and does not take into account the added
logic of the custom matching function. So the binary search will fail
to find the matching key sequence, and as a result we never get a chance
to call matches() with a potentially malleable key sequence (for example
Qt::Key_Minus when the shortcut is Qt::Key_hyphen or vice versa).

The only case we do hit the matches function is if we by chance happen
to land the binary search iterator on the "unmatched" shortcut, e.g.
Qt::Key_hyphen, but this relies on there not being any other shortcuts
that sort between Qt::Key_Minus and Qt::Key_hyphen.

Task-number: QTBUG-116873
Change-Id: Iaa90991911f32276e29e37e8c7ae87643898bfc9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-21 00:46:24 +02:00
Tor Arne Vestbø
709c93083e QShortcutMap: Rename variables to clarify their use
The state machinery of QShortcutMap is complicated enough as it is,
so let's use better variable names. In particular, let's distinguish
the registered shortcuts (QShortcutEntries), from the candidate
QKeySequence sequences that we compute based on the incoming events.

Task-number: QTBUG-116873
Change-Id: I9bd59097e786ecfb9d241c2eb7b871a4bba9b44f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-21 00:46:24 +02:00
Michael Weghorn
2496882ea7 a11y: No longer mark QAccessibleSelectionInterface as preliminary
Since the interface was introduced as \preliminary in commit
9d16d5e224, everything mentioned
as required to make it a publicly documented interface has been
implemented:

1. An a11y bridge for macOS/VoiceOver was implemented in
   98e4e992fe
2. An a11y bridge for Windows/UI Automation was implemented in
   4f9c66131d
3. An a11y bridge for linux/AT-SPI was implemented in
   ece2feee03
4. QAccessibletable implements the interface
   (see 092bbc9ad3) and
   an implementation in QAccessibleTabBar is pending in
   Gerrit

[ChangeLog][QtGui][QAccessibleSelectionInterface] The
QAccessibleSelectionInterface that was added as preliminary in Qt 6.5
is no longer preliminary. Exposing selection to assistive technology
can be achieved by implementing this interface.

Change-Id: Ic6fbc67ada32122da58ce94fa0581a27ecb2ac48
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-20 23:18:31 +02:00
Marc Mutz
dee68587d5 Update public suffix list
Version 1a4824549b093abc3077205ae5386ed57f73806d, fetched on
2023-09-20.

Pick-to: 6.6 6.6.0 6.5 6.5.3 6.2 5.15
Fixes: QTBUG-117138
Change-Id: If288d7fce714384a0132261303de31ad2299c239
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-09-20 22:33:18 +02:00
Eskil Abrahamsen Blomfeldt
5469d6a6cc Support loading variable fonts as application fonts in Freetype
When loading the fonts, we go through all the named instances
and register these as subfamilies. In addition to exposing these
variants by style name, we also register them with the according
weights, italic style and stretch. This adds a field to FontFile
to allow piping the instance index through to when we instantiate
the face.

[ChangeLog][Fonts] Added support for selecting named instances in
variable application fonts when using the Freetype backend.

Task-number: QTBUG-108624
Change-Id: I57ef6b4802756dd408c3aae1f8a6c792a89bee6a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-20 21:37:50 +02:00
Tor Arne Vestbø
3aff1e1678 QShortcutMap::find: Use plain for-loop instead of do-while
The logic was a bit convoluted, using a do-while loop when the
base premise still was that we needed a valid iterator, and
hiding the check of a QKeySequence::NoMatch to break out of
the loop far from the match() that produced it.

The tempRes (now match) variable no longer has to live outside
the loop, and the oneKSResult variable has been renamed to
clarify its use.

Task-number: QTBUG-116873
Change-Id: I730e768eae2e9a653bf4e28ceece2fe7277ef45d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
2023-09-20 21:20:14 +02:00
Tor Arne Vestbø
e2738ca949 Improve QShortcutMap debug logging
Task-number: QTBUG-116873
Change-Id: I6a2b8c25d3da8c9cbcaeb0979b4be85267ba7856
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
2023-09-20 21:20:13 +02:00
Allan Sandfeld Jensen
baac34de6f Switch QRgbaFloat api to hardcoded float parameter and return values
This makes it source compatible with Qt 6.5 by allowing us to change
FastType to something other than float, which we have done for Qt 6.6 on
systems with AVX float16 instructions.

Pick-to: 6.6 6.6.0
Change-Id: I7ebf0c178ba0ff7f04f6788d182a1a000fe31c0c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-20 19:20:13 +00:00
Alexandru Croitor
8ffb6ce64c CMake: Add a config.redo script similar to qt5's config.status
The config.redo script can be executed to reconfigure a pre-existing
qt build dir with the configure options that were last passed to the
build.

It just calls the original configure script with the -redo option.

It's nicer than calling configure + -redo manually because you don't
need to write out the full source path for configure.

In qt 5 times this script was called config.status.

On windows the script is called config.redo.bat.

Rename the config.redo file that QtWriteArgsFile.cmake writes to
to config.redo.last, so it doesn't conflict with the name of new
config.redo script.

Amends 5c40cb0f1a

Pick-to: 6.5 6.6
Change-Id: Id47c56a24561410aec6fbaa79b13fc8a78d12ed0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-20 21:20:13 +02:00
Marc Mutz
5c8910adfd moc: make qHash(SubArray) accept a seed
This prevents the use of the one-arg-to-two-arg adapter template which
we'd remove rather sooner than later, because it's causing all sorts of
problems, but probably can't, until Qt 7.

Pick-to: 6.6
Task-number: QTBUG-116074
Change-Id: I5907da0dc8c01b636d16dcc01e9c808ab9a85081
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-09-20 20:36:32 +02:00