Commit Graph

57704 Commits

Author SHA1 Message Date
Sona Kurazyan
d9544394b0 Extract header qtypetraits.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: I6cb76607213ca5d64dec669a39e8a59e13b21497
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-25 16:53:47 +02:00
Sona Kurazyan
9c706e2567 Extract header qswap.h from qglobal.h
And move qSwap() docs from qalgorithms.qdoc to qswap.qdoc.

Task-number: QTBUG-99313
Change-Id: I2385d5162a8dbb2de51a0c0509eced77b6a17159
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-25 16:53:47 +02:00
Sona Kurazyan
8aefcd4756 Extract header qtresource.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: I4dd219dcb9181bf23feb6639821764cd5dc19a24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-25 16:53:47 +02:00
Sona Kurazyan
4da3350f15 Extract header qconstructormacros.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: I3861a3095148c7927aabd8becf6f7b534f214fba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-25 16:53:47 +02:00
Sona Kurazyan
e57d2d7279 Move docs for qlonglong and qulonglong to QtTypes
These were missed by fc3441101b.

Change-Id: I3a0c3a24d584e9cdc753647bcb6a3829291c9499
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-25 16:53:47 +02:00
Tor Arne Vestbø
848e64ea8a Add qfunctions_win_p.h header for Windows helper functions
For now just includes qfunctions_winrt_p.h

Once submodules have been moved over to qfunctions_win_p.h we can move
non-WinRT specific content from qfunctions_winrt_p.h to _win_p.h.

Change-Id: I467bb4991c67a8769b60b9cf9f26aa553c439b92
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-08-25 14:43:37 +02:00
Morten Sørvig
407a39d3ca wasm: use matchView() instead of match()
QRegularExpression::match() is deprecated.

Change-Id: I66c7b3043a3805614fedcdb081c7e704e9925e5e
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-08-25 14:43:37 +02:00
Thiago Macieira
d2e9d70ec1 QMetaObject: add revision 11 for Qt 6.5
We changed qTryMetaTypeInterfaceForType() so it does record void and
void* (see commit 2d0c31e7d9 and commit
3695b35dfc). By incrementing the revision
number, we make it possible to determine at runtime whether the new
information ought to be present.

We may add even more types (namely, non-const references) before 6.5.0
is out. For pointers, the restriction remains that the metatype is
recorded only if the pointer is a pointer to a complete type.

Change-Id: Ic6547f8247454b47baa8fffd170dad79b1a90f6b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-25 03:31:28 -03:00
Yuhang Zhao
c1bdaf0a1a QSystemLibrary: Use Windows functionality directly
Passing LOAD_LIBRARY_SEARCH_SYSTEM32 to LoadLibraryEx() can also
only load libraries from the system directory, so in this case
we can use it directly instead of doing all the work ourself.

Change-Id: I4971781e55c9f1476861d599d58233114c280bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-25 12:42:18 +08:00
Mitch Curtis
502c47820a qt_fusionPalette: make links more legible on dark backgrounds
QPalette's default for Link is Qt::blue, which is difficult to read
on dark backgrounds.

Use the same blue that is already used for Highlight, as it is
consistent and easy to read.

Task-number: QTBUG-90504
Pick-to: 6.4
Change-Id: Ic7aceafb2bd0e57b65448917c352e3551ad26610
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-25 09:29:06 +08:00
Ivan Solovev
c6c41cc1a9 QtBase tests: remove QT_DISABLE_DEPRECATED_UP_TO defines
The value will be propagated from Qt build.

Task-number: QTBUG-104858
Change-Id: Iae2c32c3037438f41b92f9ee28004f30eb4e3210
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-24 22:08:49 +02:00
Ivan Solovev
373c7fe17e DBus tests: port away from deprecated APIs
Replacing QVariant::Type with QMetaType::Type

Task-number: QTBUG-104858
Change-Id: If03e2ad72b46c33f68f4382c7ed5c5801d2e70b2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-24 22:08:49 +02:00
Ivan Solovev
e5c184ecd1 tst_qshortcut: port away from deprecated APIs
Explicitly call QKeycombination::toCombined() instead of deprecated
implicit operator int().

Task-number: QTBUG-104858
Pick-to: 6.4
Change-Id: I46b0863eda445e832a9490bc2a3d05811c2df8c6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 22:08:49 +02:00
Ivan Solovev
6180e496c2 tst_qmessagebox: port away from deprecated methods
* Wrap some tests that specifically test deprecated APIs
  into #ifdefery
* Refactor some tests to use available methods

Task-number: QTBUG-104858
Change-Id: I03e318004ce1c2718ee574bf11e00df9bc04bcaa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 22:08:48 +02:00
Mikolaj Boc
906dfef22b Use the qt type Qt::Edges instead of wasm-specific
The types essentially do the same job - the one that is more general
should be used, the other - removed, as it is redundant.

Change-Id: Iec09d3311681abce1405fcf8c2cebfb72f3fd51c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-08-24 21:12:00 +02:00
Ilya Fedin
a4a51f6a64 Re-create TLW's window only when its surface type is really changed
Fixes: QTBUG-105017
Pick-to: 6.4
Change-Id: If5826172efb53b6df15dd3b7ba91b09d733cc77f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-08-24 23:12:00 +04:00
Morten Sørvig
953272eb45 wasm: add manual auto-test for websockify-tunneled sockets
Test TCP sockets usage on the main thread, on secondary threads,
and with asyncify.

Pick-to: 6.4
Change-Id: I466df8c253c6a18a9c12d44fa8f53e76f81a0437
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-08-24 21:12:00 +02:00
Morten Sørvig
a2d0ce32cd wasm: add echo_server test TCP server
Test server for in-browser TCP usage.

Pick-to: 6.4
Change-Id: Ia1a29c0e14a6d2ee8075ce202c9f6998a3ccc4c9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-08-24 21:12:00 +02:00
Morten Sørvig
cd73301a2e wasm: disable asyncify for non-static builds
The asyncify support in the event loop currently uses
EM_JS, which Emscripten does not support using from
side modules.

Change-Id: I5f961d9cd12f7b1b6cc1c2382b807a1da2918725
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-08-24 21:12:00 +02:00
Samuli Piippo
52ebf31d2b CMake: don't use full paths for X11 SM and ICE libs
Full paths were recorded into INTERFACE_LINK_LIBRARIES which could
point to temporary build directories.

Pick-to: 6.4 6.3 6.2
Change-Id: I883fd8f652e4d9ecd7d8e0076d62f5c7f4e14ec9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-24 19:11:59 +00:00
Mårten Nordheim
da9d60ecc3 Make sockets' accept() methods return qintptr
Not necessarily relevant outside windows, where the socket descriptor
is SOCKET (= unsigned 64-bit). Also follow their recommendation to not
compare to -1, but rather to INVALID_SOCKET.

Pick-to: 6.4 6.3 6.2
Change-Id: I0cfa4dfd9e147469132e2e72de22b30eab01e15c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-24 19:08:58 +02:00
Mikolaj Boc
ad1980cd43 Create a driver for running batched tests on WASM
A driver application has been prepared in js for running batched tests.
There is a convenient public API defined for reading the current test
status & subscribing to changes thereof.
The solution is modular - the module qwasmjsruntime can be used for any
wasm instantiation, e.g. in the next iteration of qtloader.

Change-Id: I00df88188c46a42f86d431285ca96d60d89b3f05
Pick-to: 6.4
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-08-24 19:08:58 +02:00
Joerg Bornemann
a021b5e09f CMake: Don't write QMAKE_PRL_BUILD_DIR to Qt's .prl files
Having the build directory encoded in installed files impedes
reproducible builds.

QMAKE_PRL_BUILD_DIR is exclusively used by qmake if 'depend_prl' or
'fast_depend_prl' is active.  This is useful for tracking the
interdependencies of libraries within a project but not for Qt's installed
libraries.  Even the qmake-based Qt build never used this feature.

Fixes: QTBUG-97386
Change-Id: Icd0801edc1ad92a99fff3a1e92b5f660914813b2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-24 15:50:25 +00:00
Kai Köhne
4b3cb1329a Doc: Remove "Container keywords" section from containers.html
For foreach, we just mention that it is deprecated, and forever is not
actually directly related to Qt containers. Both macros are also
documented in qglobal.cpp, and the section title is not referenced
anywhere so this patch won't break any links.

Pick-to: 6.4
Change-Id: I6c3e11b205237e5b502173f2216606adf5812f55
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-08-24 17:50:25 +02:00
Kai Köhne
836b2ae1e6 Doc: Remove qmake-only reference in Q_IMPORT_PLUGIN description
The Static Plugins page describes handling of qmake and CMake already
in greater detail. No need to replicate it here.

Pick-to: 6.4
Task-number: QTBUG-88044
Change-Id: I2cae85c0b0d20585b563bab9e263121181adeb8c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-24 17:50:25 +02:00
Kai Köhne
54e01d50f4 Doc: Generalize info about -rdynamic to be not qmake specific
Pick-to: 6.4
Fixes: QTBUG-88044
Change-Id: I079cb75b5a5c32e38dec73474c967cc836d94b68
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-24 17:50:25 +02:00
Kai Köhne
f9cd4a0290 Doc: Remove mentioning of variadic macros
We don't support compilers without variadic macros anymore; the check
in code was removed already in commit 4628e5cded.

Pick-to: 6.4
Change-Id: Ica4d0b2f7055e3d00ae780e23eb4e5a9d2dcc191
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-08-24 17:50:25 +02:00
Juha Vuolle
ae972085a4 Unstringify QStandardPaths Android parts
Qt 6.4 introduced new facilities to reduce the plain strings
with Android methods/signatures.

Fixes: QTBUG-104186
Change-Id: Id01f26aff253b096054f9fd6d062cebce94fdb50
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-24 18:50:25 +03:00
Sona Kurazyan
5ae013a2b6 Remove unneeded Q_DECLARE_SHARED_IMPL
After d06a686cad, Q_DECLARE_SHARED_IMPL is
used only in Q_DECLARE_TYPEINFO, so remove the indirection through
Q_DECLARE_TYPEINFO_IMPL.

Change-Id: Ida188053c4ea512e9ebdf04f807f86a6159f8425
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-24 17:50:25 +02:00
Mikolaj Boc
11f12521bc Resolve window focusing problems on WASM
- Moved the modal window resolution to
QWasmWindow::requestActivateWindow so that multiple async activation
events are not issued in unpredictable patterns.
- Request activation on added windows and on stack top in case of
window removal

Pick-to: 6.4
Change-Id: I6f02cf1b7e83abb7961caf311ffc83e91c8bf810
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-24 17:50:25 +02:00
Edward Welbourne
0acb56518d Rearrange mapLocalTime() so its millis always have the right sign
Doing a simple division to get seconds, before using rounding-down
division to get days and positive seconds, saves the need to check for
seconds and millis in opposite directions that might cause a needless
overflow when computing the final result.

Change-Id: Ia4f95bb0510eb4f2c1f9131a34d317bd41bbed2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-24 16:08:18 +02:00
Axel Spoerl
854cb55987 Make QHeaderView restore state from different stream versions
If restoring a QHeaderView state from a data stream with version Qt_5_0,
check alignment and resize mode properites for out-of-bound values.

If out of bounds, try QDataStream version Qt_6_0, which is used by KDE
apps compiled with 5.15.2 or 6.2.3.

QFileDialog stores settings in the same settings file across different
Qt versions, using different QDataStream versions. That makes
QFileDialog vulnerable to the issue (QTBUG-104962). A respective auto
test is added with this patch.

Fixes: QTBUG-104962
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104425
Change-Id: I666207fca7ab837ad27a247e504a40757ee8afab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-24 14:08:18 +00:00
Joerg Bornemann
e38c7618be CMake: Fix Android build for CMake < 3.19
The Android build used cmake_language(DEFER) and guarded with a check
for CMake's version being >= 3.18.  However, cmake_language(DEFER) was
introduced in CMake 3.19.  Fix that version check.

Fixes: QTBUG-105841
Pick-to: 6.3 6.4
Change-Id: Ic318c104cf212de4c97c5a89b73536609826fd5b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-24 15:11:40 +02:00
Michael Weghorn
1f35be2f38 tests: Fix tst_qprinterinfo for CUPS printer instances
CUPS has a feature called printer instances that allows saving
different sets of default options for a single print queue,
s. section "Creating Saved Options" at [1].

A printer instance can be set up using e.g.

    lpoptions -p printer/instance -o name=value

The printer instance is then listed with the print
queue name and the instance name separated by a slash
in the 'lpstat -e' output.
Qt also supports CUPS printer instances and displays
them using the same as printer names.

However, tst_QPrinterInfo::getPrintersFromSystem was
previously truncating the printer name at the slash,
so the comparison of printer names on a system that
has CUPS printer instances set up would fail e.g. as follows:

    ********* Start testing of tst_QPrinterInfo *********
    Config: Using QtTest library 6.5.0, Qt 6.5.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 12.1.0), debian unknown
    PASS   : tst_QPrinterInfo::initTestCase()
    QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() Test believes Default Printer                              =  "PDF"
    QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() QPrinterInfo::defaultPrinter() believes Default Printer    =  "PDF"
    QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() QPrinterInfo::availablePrinters() believes Default Printer =  "PDF"
    PASS   : tst_QPrinterInfo::testForDefaultPrinter()
    QDEBUG : tst_QPrinterInfo::testForPrinters() Test believes Available Printers                              =  QList("Canon_MX390_series", "PDF", "PDF", "PDF-5cm-margins", "dummy", "dummy-ricoh-c3000", "tofile-hp-officejet-8600", "tofile-ricoh-aficio", "tofile-ricoh-mufu", "tofile-samsung-m2875", "tofile-test-tdf106963", "tofile-xerox-phaser-6510")
    QDEBUG : tst_QPrinterInfo::testForPrinters() QPrinterInfo::availablePrinters() believes Available Printers =  QList("Canon_MX390_series", "PDF", "PDF-5cm-margins", "PDF/myinstance", "dummy", "dummy-ricoh-c3000", "tofile-hp-officejet-8600", "tofile-ricoh-aficio", "tofile-ricoh-mufu", "tofile-samsung-m2875", "tofile-test-tdf106963", "tofile-xerox-phaser-6510")
    FAIL!  : tst_QPrinterInfo::testForPrinters() Compared values are not the same
       Actual   (qtPrinters.at(i))  : "PDF-5cm-margins"
       Expected (testPrinters.at(i)): "PDF"
       Loc: [/home/michi/development/git/qt5/qtbase/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp(232)]

Fix this by adding the slash character to the regex.

[1] https://www.cups.org/doc/options.html

Change-Id: Id0dc27a8b4c592847ed364cebf277e988039cad4
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2022-08-24 14:20:14 +02:00
Mitch Curtis
9c66af1f1d Account for dark system themes in qt_fusionPalette
On Ubuntu (Gnome), the Fusion style didn't account for when a dark
theme was set in the system's settings. Neither QGtk3Theme, nor
QGnomeTheme (which it derives from) provide a palette() implementation,
so they'd fall back to QPlatformTheme's. This default implementation
calls QPlatformThemePrivate::initializeSystemPalette(), which uses
qt_fusionPalette().

This patch accounts for QPlatformTheme::appearance() in
qt_fusionPalette(), adjusting the palette roles accordingly
to look correct when run under a dark theme.

This also fixes the same issue for the Fusion style in Qt Quick
Controls.

Fixes: QTBUG-90504
Task-number: QTBUG-99276
Pick-to: 6.4
Change-Id: Id096bf809ef7a63dc440b5a68283e123173e917e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-24 15:18:21 +08:00
Mikolaj Boc
a4c0e442e5 Disable resizing only when explicitly asked
Do not assume that popups are unconditionally non-resizable. Only
disallow resizing if explicitly asked by minimum/maximum size match.

Change-Id: Ia8e3e4d074e4dc24b0ae4be56858e0d833eeebdb
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-24 04:49:11 +02:00
Mikolaj Boc
8d728a0ed9 Implement the batch_tests feature
An approach of test batching (joining multiple tests into a single
binary) has been taken, due to long linking times/binary size on certain
platforms, including WASM. This change adds a new feature
'batch_test_support' in Qt testlib. Based on the value of the feature,
test batching may become enabled with the -batch-tests switch.

Batching works for every target added via qt_internal_add_test. When
first such target is being processed, a new combined target for all of
the future test sources is created under the name of 'test_batch'.
CMake attempts to merge the parameters of each of the tests, and some
basic checks are run for parameter differences that are impossible to
reconcile.

On the C++ level, convenience macros instantiating the tests are
redefined when batch_tests is on. The new, changed behavior triggered
by the changes in the macros registers the tests in a central test
registry, where they are available for execution based solely on their
test name. The test name is interoperable with the names CMake is aware
of, so CTest is able to run the tests one by one in the combined binary.

Task-number: QTBUG-105273
Change-Id: I2b6071d58be16979bd967eab2d405249f5a4e658
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-08-24 02:46:37 +02:00
Sona Kurazyan
8446655f24 Remove QT_MODULE define
This doesn't seem to be used in any of the modules.

Change-Id: I5c007f50bdd9f5ed5f512606a0d4599593c6b40e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-24 01:00:08 +02:00
Sona Kurazyan
11ee62bf76 Move Q_AUTOTEST_EXPORT to qtconfigmacros.h
The include statements for qconfig*.h can now be moved there too.

Task-number: QTBUG-99313
Change-Id: I65f564fc48b9074861b0f8b50046062c2e83090c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-24 01:00:08 +02:00
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Juha Vuolle
501dfe1bc7 Unstringify QTimeZone Android parts
Qt 6.4 introduced new facilities to reduce the plain strings
with Android methods/signatures.

Fixes: QTBUG-104187
Change-Id: I94fc336f253e4969ac96ebcba5c1423989b340ab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-23 22:33:20 +03:00
Mikolaj Boc
80d9436488 Remove the dead drawShadePanel in qwasmcompositor
The method is not used anywhere. Remove it to save tens of LOCs.

Change-Id: Id853d12d238aa30eb197ab3fed7ccc24a2213e31
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-23 18:49:47 +00:00
Axel Spoerl
7c61eb101d Revert Q_DECLARE_EXPORTED_LOGGING_CATEGORY in tst_qdockwidget
Q_DECLARE_EXPORTED_LOGGING_CATEGORY is available from 6.5 only, hence
cherrypicking this solution fails.

Change-Id: Ib3351a8846bb5cf6047cd2d13c9f7cd242df9c93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-23 20:49:47 +02:00
Paul Wicking
767bac9c5e Doc: Format certain operators in text
Use correct text formatting; this ensures e.g. the decrement
operator isn't converted to an en dash in the docs. Apply
to increment operator docs also for consistency.

Task-number: QTBUG-105729
Change-Id: I5f126b90bc1d1b91d86e1f87c9b17a583841adb6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-08-23 20:49:47 +02:00
Laszlo Agocs
37bf3b883d rhi: metal: Update out-of-date internal comments
Would have been nice to provide a flag to set the METAL_DEVICE_WRAPPER_TYPE
env.var. but apparently it needs to be set very early, the QRhi just cannot
do it, it's too late to qputenv then. So just update the internal docs.

Change-Id: I94926debe3af73b67018c5449d7893df38f31f0d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-23 20:49:47 +02:00
Marc Mutz
6b146566e6 [docs] QAnyStringView: remove the prediction that Qt 7 will drop L1
UTF-8 can never replace Latin-1 as the go-to US-ASCII superset,
because, as a variable-length encoding, it cannot use the important
size check in equality comparisons with UTF-16 to avoid having to
iterate the whole string data.

Mention that.

UTF-8 only makes sense in a UTF-8-only environment where the size
check works again. As long as our preferred charset is UTF-16, Latin-1
must be the preferred US-ASCII wrapper.

Pick-to: 6.4 6.3 6.2
Change-Id: Ibe52cfc0c9fce0e7aaacd4cd8d6361e8d8bdee3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-23 20:40:59 +02:00
Timur Pocheptsov
da951c9dbf QCocoaDrag: don't add pasteboard items with non-absolute URLs
AppKit rejects them and we end up with inconsistent number of pasteboard
items and drag images:

"NSURLs written to the pasteboard via NSPasteboardWriting must be absolute URLs."
"There are 1 items on the pasteboard, but 2 drag images."

Fixes: QTBUG-105711
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I7b1bc99f6e0b2b304f92f69125fb6af4ab5e303f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-23 07:59:19 +02:00
Yuhang Zhao
1270284f8d QSystemLibrary: Cache the system directory path
The system directory path won't change during the lifetime
of the application, so cache it to avoid querying it for
multiple times.

Change-Id: I302285794d491d581d74a93e7ba9affc6379c681
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-23 11:24:15 +08:00
Yuhang Zhao
00618db5ff QSystemLibrary: Use in-class initialization
Initialize the member variables in class. It's more modern and
also saves some typing in some constructor functions.

Change-Id: Ib4d942610a57e0af3f22248c00207d7cdb683763
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-23 11:24:06 +08:00
Ilya Fedin
c2bcba0d3c Fix build without highdpiscaling feature
Fixes: QTBUG-104925
Pick-to: 6.4
Change-Id: Ieb5dd2194c54a61733c427c8a0ddf7576147d6ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-23 05:41:16 +04:00