Commit Graph

59861 Commits

Author SHA1 Message Date
Kai Köhne
a4579121ca Doc: Simplify description of QKeySequenceEdit::maximumSequenceLength
Main purpose is to limit the number of keys a user can enter, so
let's be explicit about this. 'Truncation' seems to happen only if
the program programmatically sets a longer sequence to the edit,
which is arguably a programming error and also shows up as a
warning in the logging API.

Pick-to: 6.5
Change-Id: I7b2b74e8dab44c5ad16ffefc25c5610708139353
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2023-01-18 08:24:01 +01:00
Ahmad Samir
5d0b338f4d QString: add note about isNull() vs. isEmpty() to more methods
Namely compare() and operator==().

Change-Id: I7e404f2f1df5b93614f7e266bdbebe909e4e7623
Fixes: QTBUG-54505
Pick-to: 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-18 05:53:19 +02:00
Mikolaj Boc
16bf899557 Streamline reading of js DataTransfer object
qwasmclipboard.cpp and qwasmdrag.cpp had the same logic that read
the js DataTransfer object implemented twice with small differences.
Use a single implementation in both.

This also introduces a clearer memory ownership model in the reader
code, and fixes a potential race condition by introducing a cancellation
flag.

Removed the useless QWasmDrag type which was in essence a SimpleDrag
and made the m_drag in QWasmIntegration a smart pointer.

Fixes: QTBUG-109626
Pick-to: 6.5
Change-Id: I5b76dd3b70ab2e5a8364d9a136c970ee8d4fae9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-18 02:55:12 +01:00
Qt CI Bot
2e8b75477f Merge integration refs/builds/qtci/dev/1673982362 2023-01-18 00:51:53 +00:00
Thiago Macieira
a14a3a5487 QUrl: restore empty-but-not-null for components that are present
This got lost during the QStringView port that happend in Qt 6.0
(commit 548dcef089) because
QString::operator+=(QStringView) does not copy the nullness of the right
side, whereas QString::operator+=(const QString &) does.

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-84315
Change-Id: Ide4dbd0777a44ed0870efffd17399b772d34fd55
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-17 16:51:53 -08:00
Thiago Macieira
a26d25be7b Suppress GCC 13's -Wmaybe-uninitialized in q_uninitialized_relocate_n
Its objective is to copy uninitialized content and that's fine.

qcontainertools_impl.h:73:25: error: ‘~~~’ may be used uninitialized [-Werror=maybe-uninitialized]
   73 |             std::memmove(static_cast<void*>(out),
      |             ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   74 |                          static_cast<const void*>(first),
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   75 |                          n * sizeof(T));
      |                          ~~~~~~~~~~~~~~

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd173917092b671dd0
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-01-17 16:51:53 -08:00
Assam Boudjelthia
609e14724e Android: pass EXTRA_INITIAL_URI to native FileDialog
Allow setting the initial directory where the file dialog
will be opened.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I1395b367c74d28fb2890ac53a90456c3ac4c1b05
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2023-01-18 02:44:41 +02:00
Joerg Bornemann
a707ae094d Fix macOS build for CMake < 3.18
We must explicitly set the GENERATED property on source files we
generate.

This amends commit f0a7d74e1d.

Change-Id: Ifab405cd98deece49a1566ae04220e2b5d576429
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 21:28:06 +01:00
Joerg Bornemann
392d9a5419 CMake: Fix configure -no-rpath
The -no-rpath configure switch had no effect.

Pick-to: 6.5
Change-Id: I306ec33249a219066ce94d18da5f1ca3d92905e1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 21:28:06 +01:00
Amir Masoud Abdol
20821877bb Remove an obsolete TODO item
__GlobalConfig_install_dir translates to lib/cmake/Qt6/ and 3rdparty
modules will be in lib/cmake/Qt6/3rdparty which seems to be a logical
place for them.

Pick-to: 6.5
Change-Id: I90c715b9502b0dfc666bb3202a838f20ba6110cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 21:28:06 +01:00
Amir Masoud Abdol
9c90cd7fb9 Add the ltcg flag to .pri files
QT_FEATURE_ltcg is TRUE if either of
CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON or
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>=ON are passed to the
configure, or the cmake command.

Pick-to: 6.5
Change-Id: Ibaece67de6cc6f89e505038fd02fb50008c47d48
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 21:28:06 +01:00
Ievgenii Meshcheriakov
42f555f861 QUnicodeTools: Use QVarLengthArray in Thai support code
This replaces an ad-hoc solution.

As a drive-by, remove a check that was always true.

Pick-to: 6.5
Change-Id: I72166ee75a2c474dc91bc699c790f256b78b3b7a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 19:24:09 +00:00
Thiago Macieira
a7c3b747db tst_QHostInfo: use python3
Because Python 2 reached end of life. I wonder how this even works on
macOS, as my Monterey doesn't even have "python" any more.

Pick-to: 6.2 6.4 6.5
Change-Id: Ibddb9b0ada5a4bbaa64bfffd173b239c6c4b66f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-17 10:43:17 -08:00
Ahmad Samir
a67e7e3bb7 QLocale: add unittests for qstrtod of "NaN" and "nan"
The tests pass.

Drive-by change: Amend qstrntod API docs, the addition is heavily
inspired by cppreference's strtod docs.

Change-Id: Ic8e138e117a3249c752ae5ef2a8a21feb010befa
Task-number: QTBUG-74325
Pick-to: 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-17 20:41:48 +02:00
Thiago Macieira
d079ca3429 QCborValue: fix build with GCC 13: extended FP support
qcborvalue.cpp:892:32: error: converting to ‘qfloat16::NativeType’ {aka ‘_Float16’} from ‘float’ with greater conversion rank [-Werror]

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd173906b7cf7c1619
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-01-17 10:35:46 -08:00
Fabian Kosmale
1d43cbfede qarraydataops.h: Pass initializer_list by value in copyRanges
initializer_list is supposed to be cheap to copy, and passing by value
will avoid one further indirection (though the compiler can probably see
through it, anyway).

Pick-to: 6.5
Change-Id: I8ffbf5de4d8cf2c85f4cff76ef63d6cdeac4db5a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 19:22:24 +01:00
Fabian Kosmale
aaa198cb5c qproperty.h: Make ctors explicit
Addresses comments from API review.

Pick-to: 6.5
Change-Id: I859079cc918aa67dffe0c780f6d0b9712652bb4a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 19:22:24 +01:00
Peter Varga
56d72d36bf Update description of topleveldomain feature
qTopLevelDomain() is misleading in the configure summary. The function
has been removed by commit 50b3097683

Also clean up the topleveldomain files.

Pick-to: 6.5
Change-Id: Ib577962909a83f4f41d1660a26fd80b37803ae18
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 18:21:26 +01:00
Tor Arne Vestbø
ada434e417 permissions: Take PlistBuddy exit code into account when reading Info.plist
Otherwise we might conclude that we found a usage description when
PlistBuddy outputs "Error Reading File: /tmp/Info.plist" to stdout.

For CMake this is not an issue as we pipe stderr to a separate variable,
that contains "Cannot parse a NULL or zero-length data" in this case.

Fixes: QTBUG-109967
Pick-to: 6.5
Change-Id: I9d819b6de405b88bb7d1d75c22b6f5187f26e553
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 16:53:57 +01:00
Amir Masoud Abdol
1b4aba0a59 Remove an obsolete TODO
There was a plan to invert the API, but since the TODO, we are settled
on the non-inverted name, ie., GENERATE_CPP_EXPORTS.

Pick-to: 6.5
Change-Id: I84f531d870965e0b7d0d821d1ff08606ab8054ab
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-17 16:15:11 +01:00
Tor Arne Vestbø
c8839448cc CMake: Tweak qt_internal_get_framework_info to match documentation
<out_var>_private_header_dir and <out_var>_private_module_header_dir are
documented to point to "the specific framework version and framework
bundle version".

Pick-to: 6.5
Change-Id: I00053f106ec9be88f7892c842ca75549cfc54124
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 16:15:11 +01:00
Alexey Edelev
3002816d77 Restrict the minimum supported ICU version to 50.1
ICU 50.1 was released May 11th, 2012. Despite of the restriction, all
currently supported operating systems will continue to be supported.
All mismatches described in QTBUG-99715 are fixed in this version.
Restricting to 72.1 (latest version as per January 2023) or 63.1 (2018)
would still exclude e.g. RHEL 9.0, which ships version 56.1.

Task-number: QTBUG-109505
Pick-to: 6.5
Change-Id: Ic5cd7927d6f5fb60a89423c305796a9ed311bfa2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-17 15:15:11 +00:00
Mårten Nordheim
2fe69dbeb8 Fortune* Example: remove needless unset-ing of window flag
It's unset by default in Qt6.

Task-number: QTBUG-108875
Pick-to: 6.5
Change-Id: I3f1c6e4e6de54e9ca0ed8892f9da1d346d16d4c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-01-17 16:15:11 +01:00
Mårten Nordheim
71cd3bc074 Fortune* Example: Bump QDataStream format version
One of the examples were using a different version than the others.
Though QString's formatting probably didn't change since then so
it was no problem.

Anyway, pretend like we're releasing it now for the first time and
set 6.5 on all of them

Task-number: QTBUG-108875
Pick-to: 6.5
Change-Id: I28b496ab3d8ff54c503a032ba15882cdf3d5eccf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-01-17 16:15:11 +01:00
Mårten Nordheim
605eec7b55 Fortune* Example: convert simple for-loop to ranged-for
Ends up shortening the loop, making it easier to read at a glance.

Pick-to: 6.5
Task-number: QTBUG-108875
Change-Id: Ia12a994259b00e9b57f2de48124be9cb38553bf5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-01-17 16:15:11 +01:00
Mårten Nordheim
45717db7a5 Threaded Fortune Example: update example to use qintptr for descriptors
Pick-to: 6.5
Task-number: QTBUG-108875
Change-Id: Ie635a3d2c4c61a59547e8fed0ec84da8538968a3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-01-17 16:15:11 +01:00
Jan Arve Sæther
0280b7eb96 Painting examples: Don't mix const_iterator and non-const iterators
Reported by Clazy

Pick-to: 6.5
Change-Id: I80fce912b1e5390f0056b1fa9ae0d3cfcf39d045
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-17 16:06:08 +01:00
Marc Mutz
8ef22183d6 QStringView: remove pointless Q_ASSERT in toString()
QString and QStringView have the same size_type these days.

Pick-to: 6.5 6.4
Change-Id: I59ffe78f51e06ccc130562b1682fb4a672c3ec22
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-17 15:39:05 +01:00
Marc Mutz
cc236d5e0c [doc] QPermission: some fixes
- QPermission_s_ -> QPermission

- add a comma to make a text piece clearer

Pick-to: 6.5
Change-Id: I08469cca9a05b08772d101fdab4eccd6b9cfcab8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-17 14:39:05 +00:00
Jan Arve Sæther
1e790fb4db Compile easing curve example with -Weverything
As a consequence, also had to add some suppressions:
-Wno-padded         (this warning should almost never be responded to)
-Wno-c++98-compat   (we want to use c++17 features)
-Wno-weak-vtables   (IMO not worth fixing for an example)

Pick-to: 6.5
Change-Id: I28ae4456c0221ad2370879a691f6343affff138b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-17 13:45:55 +00:00
Mikolaj Boc
6a9e89121d Concatenate blacklist files for test batch
This works by collecting the paths of all blacklist files
and deferring a call which ultimately reads all of the files and
glues them together to form a master blacklist file for the batch.

There might be conflicting function names inside the batch. For now
we ignore the problem, while keeping in mind that it exists.

Fixes: QTBUG-110016
Change-Id: I9c8412097418c6e93297ab89af718d7466e2e451
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-17 13:45:39 +00:00
Eskil Abrahamsen Blomfeldt
02effb2c37 Remove redundant scope for glyphRuns() default parameter
Noted in API review: Improves formatting and readability.

Pick-to: 6.5
Change-Id: I3a8f769899031410d00397a885f115adcca82f3b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 11:59:36 +01:00
Eskil Abrahamsen Blomfeldt
6975dd38c1 Explicit type for new enum type
Noted in API review.

Pick-to: 6.5
Change-Id: I98ec47f4c934156990d67363b69ccd33617661de
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 11:59:36 +01:00
Tasuku Suzuki
d369eabc30 Fix build with -no-feature-menubar
Pick-to: 6.5
Change-Id: I72bd07dbdcfe07badaadce9f19949ee3e352b13e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 19:59:36 +09:00
Marc Mutz
8a96dee4cb QWindowsMimeConverter: fix copyright year
Noted in API review.

Pick-to: 6.5
Change-Id: I08a5cb5cec1d7a13d96c22b69c7999eccfb4f932
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 10:10:31 +01:00
Axel Spoerl
c84f3fd370 QCommonStyle code cleanup
Consistently use int (instead of uint) type for alignment/text
formatting flags passed to QStyle::drawItemText (and overrides).

Clean variables in QCommonStyle::sizeFromContents
- use self-explaining variable names
- rename misleading variables
- define one variable per line
- use consts whereever possible
- insert new lines to make code easier to read
- correct wrong indentations
- use auto in qstyleoption_castis to respect maximum of 100
characters per line

Pick-to: 6.5
Change-Id: Ie145c089606436213c813227154fac29962825d0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-17 08:56:44 +01:00
Tasuku Suzuki
c65834279c Fix build with -no-feature-dialogbuttonbox
Pick-to: 6.5
Change-Id: Ia6ac9e6acffda80794a5949793fddc3ab849a98a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 16:00:12 +09:00
Volker Hilsheimer
2951f72584 Remove mousebuttons examples
The example didn't show anything useful, and seemed more like a
manual test case.

Pick-to: 6.5
Change-Id: Ia71f39b26943aab04b6895e63b6eed50dd084bfd
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-17 06:42:04 +01:00
Tasuku Suzuki
ca772a8ffa Fix build with -no-feature-buttongroup
.../qabstractbutton.cpp: In member function ‘virtual void
QAbstractButton::keyPressEvent(QKeyEvent*)’:
.../qabstractbutton.cpp:1010:58: error: incomplete type
‘QGuiApplicationPrivate’ used in nested name specifier

Pick-to: 6.5
Change-Id: Ia71bb481d125087aa813c891f9508755f435f4d2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 05:07:07 +00:00
Tasuku Suzuki
cff65c860f Fix build with -no-feature-menu
Pick-to: 6.5
Change-Id: Ie18d896799dd99c74dcdf00cd43c2aedcd9b8d1c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 12:53:10 +09:00
Tasuku Suzuki
010a898771 Fix build with -no-feature-draganddrop
Pick-to: 6.5
Change-Id: I88ecd9a84d7fb9f6cb78027cc51e34089e211ff2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 12:53:10 +09:00
Tasuku Suzuki
1613975d95 Fix build with -no-feature-messagebox
Pick-to: 6.5
Change-Id: I4c34f6aa2106afc528f182d7925442acf82b7000
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 12:42:54 +09:00
Tasuku Suzuki
7774c1b079 Fix build with -no-feature-imageformat_png
Pick-to: 6.5
Change-Id: Ib742665b2c379ff600b6a99432c89567a3f7765b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 03:42:53 +00:00
Ievgenii Meshcheriakov
5679f9f82c QUnicodeTools: Use a global static to manage libthai state
Move all libthai symbol resolution and state management into a single
class. Create a single global static instance of this class. This allows
freeing of the state on program exit.

Task-number: QTBUG-105544
Pick-to: 6.5
Change-Id: I2610863f85f49f88e83f1fdaa200ea277c88c0ef
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-17 04:18:11 +01:00
Marc Mutz
800ebd84f5 QVarLengthArray: cope with vector<unique_ptr>'s copyability
Despite being move-only, std::vector<unique_ptr> advertizes
is_copyable:
  https://quuxplusone.github.io/blog/2020/02/05/vector-is-copyable-except-when-its-not/

Our combined reallocation and resizing function, reallocate_impl(),
runs afoul of this when it uses std::is_copyable in a constexpr-if to
implement resize(n, v) without running into problems with move-only
types: the trait is true, but actual instantation runs into a
static_assert in the STL implementation.

To fix, move the problematic resize functionality out of
reallocate_impl() and into the resp. resize_impl overloads. The shrink
functionality remains in reallocate_impl(), because there are many
more users, and it only requires destructible<T>, which isn't
constraining at all.

Amends a00a1d8806.

Fixes: QTBUG-109745
Pick-to: 6.5 6.4
Change-Id: Ibc5b9cf5375108eb3d8f6c8a16d4fd02dadd73b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-16 22:44:13 +01:00
Tasuku Suzuki
03ed57afa0 Move QApplication::autoSipEnabled() to public scope
The method is not meant be a slot.

warning: getter QApplication::autoSipEnabled possibly mismarked as a
slot [clazy-const-signal-or-slot]

[ChangeLog][QtWidgets][Potentially Source-Incompatible Changes]
bool QApplication::autoSipEnabled() is no longer a slot. Code such as
using QObject::connect() to connect to it as a slot or accessing it
through meta object system will have to be rewritten.

Pick-to: 6.5
Change-Id: I892a51120478f3c90e5834c8e3e00bc836b84c52
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-16 20:30:28 +00:00
Tasuku Suzuki
e0a5915f88 Fix build with -no-feature-shortcut
qplatformtheme.h complains about Q_GADGET without <QtCore/QKeySequence>

Pick-to: 6.5
Change-Id: I7561bd3e2484c44842cd25ab12aacb9c00ebedfd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 03:59:09 +09:00
Tasuku Suzuki
b4efc552d8 Fix build with -no-feature-toolbar
Pick-to: 6.5
Change-Id: I9a76ff0896545dff0e945daaec0aeae2236c1e42
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 03:59:09 +09:00
Peter Varga
67fc186f9c Pass flags with dash to rc.exe when auto-generating win32 rc files
Fixes clang-cl build:
  clang-cl: error: no such file or directory: '/c65001'

Pick-to: 6.5 6.4
Change-Id: I9f134f866f17d1eeb12a28b72580151c409a98f6
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-16 19:59:09 +01:00
Amir Masoud Abdol
d4121dd876 Remove an unnecessary call to _qt_internal_generate_tool_command_wrapper
Alexandru mentioned that at the time qtdeclarative was still using the
variable, but from then, he replaced those as well, and I couldn't find
any usage anymore either.

Change-Id: I6a1893c2dfaa483dc8cb865f7bacf08cadca985b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-16 19:18:28 +01:00