Commit Graph

61198 Commits

Author SHA1 Message Date
Jan Moeller
ffdfafc4b4 Ignore removed/changed screens if no QIOSIntegration instance exists
QIOSTracker registers itself as handlers for system notifications about
changes of the screen environment. If no QIOSIntegration instance
exists, newly detected screens are not added to the list of known
screens (see screenConnected()). This, in turn, will result in a crash
if a screen is disconnected and removed in screenDisconnected() as it
is not known to qtPlatformScreenFor() and the function returns a
nullptr.

Consider the QIOSIntegration also whenever a screen is "changed". This
is more of a safety measure do avoid crashes for unknown screens.

This situation occurs if an iOS device is used to mirror the display
via AirPlay and no actual QGuiApplication exists, e.g. Qt is only
embedded in a Framework.

Pick-to: 6.5 6.2
Fixes: QTBUG-106701
Change-Id: Id778fc5afa7c284b0536ee02b1ba2c10321cc5b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
2023-04-18 09:22:46 +02:00
Volker Hilsheimer
c4449c040c Add helper template for metacall event creation
Setting up the args and types arrays is cumbersome and error prone, and
we do it at least twice in qtbase. Provide a central implementation as a
variadic template function, and make it exception-safe with a unique_ptr
(the destructor of QMetaCallEvent will destroy the cloned arguments).

Change-Id: I5ff400467928446264eaedddb394691e9e23d22e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-18 00:11:13 +02:00
Christian Ehrlicher
db7dc35897 SQL: replace qPrintable() / toLocal8Bit() with unicode versions
Replace qPrintable() and toLocal8Bit() with qUtf16Printable()

Change-Id: Id30b5ba611b005faab91a08b10a9dc5569fd7a07
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-18 00:11:05 +02:00
Volker Hilsheimer
fd879a38cc Fix another warning when comparing size_t and qsizetype
Amends 07f7ed2bad.

Change-Id: I0644e47e8e9ccd0bcaf074adf99e7481c692b5c1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-18 00:10:56 +02:00
Amir Masoud Abdol
bafe9dfc61 Pass native path in qt-internal-configure-tests
In the previous patch, I did not account for how we usually use the
qt-internal-configure-test.bat in our CI. This should be a more robust
script, where we search for the source path, -S <PATH>, make it native,
and put it back.

Amend 389b3a131a

Pick-to: 6.5
Change-Id: Ic59de2eb1e6720de150a9e15a4b38fae4d871815
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-17 23:32:34 +02:00
Yuhang Zhao
97ee38eb52 SQL plugins: add mimer to the help text
Change-Id: Icd080131924ad1e3fb42fc39327621faac0b1659
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-18 05:32:34 +08:00
Joerg Bornemann
0aa9b08536 qmake: Fix infinite make loop if RESOURCES contains nonexistent .qrc
If RESOURCES contained a non-existent .qrc file, qmake produced
Makefiles that resulted in an infinite loop when running GNU Make.

Introduce a new extra compiler CONFIG value "remove_no_exist" that
removes non-existent extra compiler input. This value is now used in the
extra compiler that handles the RESOURCES variable.

The difference to the existing CONFIG value "ignore_no_exist" is that
qmake still prints a warning about the non-existent file.

Pick-to: 6.5
Fixes: QTBUG-112743
Change-Id: I3293af75b75f217e1a1738b49da0af1117cfdecb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-17 23:32:34 +02:00
Friedemann Kleint
69d4ecd6ef Remove unused documentation code snippets
Modules:
- Core
- Gui
- Widgets
- Open(Widgets)
- PrintSupport
- Sql
- Network
- Concurrent
- Testlib

Pick-to: 6.5
Change-Id: I63e58c01bec4bd162486020f0085227fdaa83b18
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 21:02:32 +02:00
Timothée Keller
94279afff8 Windeployqt: change MinGW dll's import location
The MinGW runtimes were imported through the PATH, which creates
mismatches with the expected libraries that are installed directly
through Qt. Check if those can be used instead, and issue a warning
(and default to PATH) if not.

Fixes: QTBUG-112448
Pick-to: 6.5
Change-Id: I061baabb6d6188bd0817b68c39a5d9f04ff391b5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-04-17 16:24:59 +02:00
Kai Köhne
a03fdd65ee Doc: Fix dead link in QCA::translate()
There's no 2nd translate() method. Instead, link to the section about
I18N in the summary.

Pick-to: 6.5
Change-Id: I7c3177cee91eeb550eb24b6f272a175b5c0e5487
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-04-17 16:23:24 +02:00
Laszlo Agocs
5f3c3044a5 rhi: d3d12: Implement debug markers
As usual this is only doing anything when launched with
QSG_RHI_PROFILE=1. Otherwise the debugMark* functions are
no-ops.

Uses the old PIX API (pix.h) since that is what is available in the
Windows SDK. This works well with RenderDoc. The strings show up
in PIX captures as well although that will warn that the pix.h stuff
is deprecated. Unfortunately using the PIX3 API involves headers and
libraries not part of the Windows SDK so we do not want to open that
can of worms now.

Problem is, pix.h may not be present in some SDKs as shown in the CI.
So use __has_include and lose the whole feature if the header is not
present at build time.

Change-Id: I8606d151f75a492071bf0c8d98b16026ff94d45c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-04-17 16:06:17 +02:00
Liang Qi
14feb6792e tests: blacklist tst_QGraphicsEffect::draw() on Wayland
Task-number: QTBUG-109779
Pick-to: 6.5
Change-Id: I21ecd4910ba3d699e44d9ea922093e98e0b8a335
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2023-04-17 16:05:24 +02:00
Ahmad Samir
044a29bc66 corelib/global/*.h: use static_assert instead of Q_STATIC_ASSERT_X
qtconfigmacros:
Otherwise we'd need to include <QtCore/qassert.h> before using
QT_REQUIRE_CONFIG. It cannot be added here as qassert.h itself uses
QT_CONFIG, i.e. qassert.h needs to include this header. And
Q_STATIC_ASSERT_X is only kept around to keep old code working.

_Static_assert is deprecated in C23:
https://en.cppreference.com/w/c/language/_Static_assert

Change-Id: Ie60a02274cc5be8bd1c6dc3819ccfbc2e7864a21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-16 22:17:51 +02:00
Giuseppe D'Angelo
3b81d04bc6 QMetaType: more doc tidies for the flags
Change-Id: I354b2dc901ecb1b2baa717c74e265e9201d8e63e
Pick-to: 6.5 6.2 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-16 12:00:24 +02:00
Giuseppe D'Angelo
ecfa13bdac QMetaType::IsGadget: doc tidies
Although undocumented (which is weird, as other docs refer to it),
fix the spelling and the formatting.

Change-Id: Ief8b04e3b9272386c663c463c3659e8b837260f5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-04-16 12:00:17 +02:00
Ahmad Samir
c1e1d133c4 mimetypes/: port to qsizetype
Fixes compiler warnings about narrowing conversions.

Found by compiling with clang and -Wshorten-64-to-32.

Drive-by changes:
- use range-for instead of an iterator based loop
- use strlen("*.") instead of magic number 2

Pick-to: 6.5
Task-number: QTBUG-102461
Change-Id: I0bf2299049c0411ed496468238ca30b69946ffc2
Reviewed-by: David Faure <david.faure@kdab.com>
2023-04-15 17:21:10 +02:00
Christian Ehrlicher
8ca2d6ba09 CommonStyle/QSpinBox: fix rendering up/down symbols in high-dpi mode
The previous patch for QTBUG-112019 could lead to an uneven length which
in results in an incorrect center. Fix it by making sure that the length
(and width) of the two rectangles are even so we always get a proper
center without fiddling around with float values. Also honor
PM_ButtonShiftHorizontal/Vertical now (was forgotten in the last patch).

Pick-to: 6.5
Fixes: QTBUG-112019
Fixes: QTBUG-112861
Change-Id: Ifc19b863c761ae545208b996ba60d1f33bceb2b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-15 13:56:27 +02:00
Christian Ehrlicher
d9bd46b2b8 SQL/Tests: make sure created procedures are cleaned up on exit
Similar to TableScope - create a helper class to make sure the
procedures are cleaned up on exit so they don't affect the result during
the next test run.

Change-Id: Ic5b02ca63e03f330392797ed22313767557fc548
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-15 13:56:21 +02:00
Frederik Gladhorn
db346e711c Fix accessibility on XCB when running as root
Accessibility actually works when running applications as root, but we
would never properly connect, since the enabledChanged signal would be
emitted from the constructor in this case. So after connecting the
signal, check the value by hand to make sure not to miss the
notification.

Only applications running as root would be affected, because all other
applications would go through the asynchronous pattern of getting the
bus address from dbus instead.

[ChangeLog][QtGui][Accessibility] On XCB applications running as root are
now accessible.

Pick-to: 6.5
Fixes: QTBUG-43674
Change-Id: I82cdc35f00693a8366dfcdab2f2c3c6dc5f5b783
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-15 05:48:27 +02:00
Vladimir Belyavsky
5564b166a3 QNetworkInformation[Win]: Catch potential WinRT exceptions
Some Windows SDKs seem to throw an exception from winrt::check_hresult()
We need to handle this accordingly. Catch the exception and print relevant warning.

Fixes: QTBUG-110408
Pick-to: 6.5
Change-Id: I1434ec425f0d0e597308b53f25f4f15049640060
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-04-14 21:26:29 +03:00
Volker Hilsheimer
79ac430537 Test for QWindow getting enter/leave events when secondary window shows/hides
Equivalent to the test added to the QWidget test case, but since QtWidgets
code contains logic to both synthesize and compress/filter enter/leave
events, we can only verify that the QWindow does get the events.

The test is very flaky on Windows, so blacklisting it right away.

Change-Id: Ic1da9439f60f619a76a3653a23fef8e9ebc0e75d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-04-14 20:13:41 +02:00
Christian Ehrlicher
d71dc36f47 QSQLDatabase: avoid some code duplication
Avoid some code duplication and enhance the documentation about
thread-safeness of QSQLDatabase::cloneDatabase()

Fixes: QTBUG-60505
Change-Id: I6ca6b9f47d818d49ca51395da14051e40317cef6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 19:25:55 +02:00
Amir Masoud Abdol
6de26ae531 Exclude thread/qwaitcondition_unix.cpp from the Unity Build
Temporary exclude `qwaitcondition_unix.cpp` from the unity build, until
either of the mentioned change sets get merged.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Iaacd090647ba007e0ab714dc674e67552f85c350
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-14 18:34:06 +02:00
Amir Masoud Abdol
389b3a131a Add drive letter to source paths when calling qt-internal- scripts
Like qt-configure-module.bat, when building with unity build, CMake
needs to know the full path of the source directory to be able to
correctly generate its `*_cxx.cxx` files. So far, this seems to only
affect Windows' LLVM/MinGW builds. By this patch, I make sure that we
pass the full path to CMake.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ida2da127ecba95856b6e0091936c471c2a116936
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-14 18:34:05 +02:00
Amir Masoud Abdol
38d56e2b72 Add [[maybe_unused]] attribute to an unused variable
Otherwise, it could break the unity build.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic1b3ac51b8a9e8bb93a3b1a4d6717fa45099e91b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-14 18:34:05 +02:00
Edward Welbourne
76075aa3a9 QDate: enable {start,end}OfDay() to make second-adjustments
Previously it only got the answer correct to the minute. That's good
enough for most transitions, but those involving local solar mean time
(LMT) may have second deviations. So check the second before or after,
that'll usually be the other side of the transition; if it isn't, do a
further binary chop on seconds to hit the correct value.

Most zones' canonical locations are only specified to the size of a
city, so second precision is all anyone cares about; a few hundred
metres difference in location would change that. The one exception is
Europe/Amsterdam, which had its own Royal Observatory and time
standard, hence had an offset known to greater precision; but the IANA
DB duly approximates that, too, so we won't have data with millisecond
precision even in that case, so don't try to refine beyond second.

Change-Id: I20fb355f8113c32387ed8a84fbf5a41004273978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-04-14 13:23:50 +00:00
Edward Welbourne
b906796af6 Fix QDateTime tests in zones whose side of UTC varies
The classification of local time as ahead of UTC, behind it or equal
to it gets complicated by zones near the prime meridian - some of
which have varied which side of it they nominally are - or the
international date line, which a few zones have crossed.

So, instead of having one classifying variable, split to having three,
one for the distant past (when using local solar mean time), one for
the epoch and one for the distant future.

Change-Id: I7c0da376e1625372086dc51afa815756f0bde442
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:23:09 +02:00
Edward Welbourne
462d3547f7 Add a manual test helper script, foreachzone
This makes it possible, on a system with /usr/{lib,share}/zoneinfo/,
to systematically run a command with TZ set to each system-supported
zone. For example, it can be used to verify that a corelib/time/ test
passes regardless of the valid setting of TZ.

Change-Id: I6ea9a64d8bcb745aea80ab9ae431602d3e3265a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:22:27 +02:00
Edward Welbourne
9f11574a7d Explain the cases where we must exclude some QDTE test cases
The stepIntoDSTGap() hour cases were already conditioned on hour > 0,
explain why. The month and year tests need similar checks for kindred
reasons; add and document those checks.

Pick-to: 6.5
Change-Id: Ibcb69449fcd572ee94306a805fd680e9b5155322
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 15:22:16 +02:00
Edward Welbourne
ee46c645a6 Skip some tests that fail in the Indian/Cocos timezone
The zone had a transition at the start of 1900, so QDTP's default date
ends up being 1900-01-01 at 00:02:20 instead of at 00:00:00; and any
parsing of date-time strings that doesn't set the minutes and seconds
consequently ends up "wrong" (about a field that wasn't specified).

Change-Id: If4b9864616fa08bc023a6974dae255f96ca90f83
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:21:50 +02:00
Edward Welbourne
90d4957c12 tst_QDateTimeParser::intermediateYear(): adapt for Indian/Cocos zone
The zone had a transition at the start of 1900, used as default date
by the parser. This leads to the default minutes and seconds being 2
and 20, rather than 0. Since this test is parsing a date-only string,
only check the date of the result, to avoid failing in Cocos.

Pick-to: 6.5
Change-Id: Ifb307eadb747097988bcf0afc6f307835ff2c8ec
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:21:39 +02:00
Edward Welbourne
b81515c58a Correct a test's precondition on the system zone
America/Sao_Paulo was not alone in starting 2008-10-19 with a spring
forward. Include the other affected zones in the check to tune the
expected start-of-day time. See [0] for details.

[0] https://github.com/eggert/tz/blob/main/southamerica

Pick-to: 6.5
Change-Id: If251d8b715090319441790696983273637765d2e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:21:22 +02:00
Edward Welbourne
bab9af5891 Fix where possible, else avoid, failures in western Mexico
Some QDateTime tests get tripped up by a transition at the epoch in
Baja Mexico. For the operator_eq() and time-difference test, simply
using startOfDay() instead of QTime(0, 0) - which was skipped - solves
the problem. For addDays() and fromStringDateFormat(), skip the
affected tests.

Change-Id: I3620f0d1e4b05d9f799662eea96a40c8284de331
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:19:08 +02:00
Edward Welbourne
ca4aa06523 Add new test-case for startOfDay_endOfDay() for Baja Mexico
The zones in Baja Mexico had a transition at the epoch.

Change-Id: Ic70e23bcc980bf371e925fcb8fb83ca5ef000c9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:19:03 +02:00
Edward Welbourne
919d2e0c5a Correct time zone in tst_QDateTimeEdit::stepIntoDSTGap()
Given that QDTE only supports local time and UTC, using Europe/Oslo as
zone was disconnected from reality, especially as various QDateTime()s
were constructed using local time. Use the system zone.

Pick-to: 6.5 6.2
Change-Id: I95b3a6a6acf9ffc2b8c7f05d3dd9440ff173abfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 13:19:03 +00:00
Edward Welbourne
d43391422a Correct the start of a QDTE::stepIntoDSTGap() test
The test wants to start shortly after the transition, then step an
hour backwards, into it, to check we land safely on the other side.
However, it assumed the gap witdh was an hour, which is not reliable.
Use the gapWidth already used in computing springGap instead.

The -3590 seconds in the result time is correct, as it's the ten extra
seconds we started beyond the gap, minus the hour we step backwards.

Pick-to: 6.5
Change-Id: I4399af7e54a60bd55ea51d054d3cd2ecfcb0e354
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 15:19:03 +02:00
Edward Welbourne
5432a8040f tst_QDateTimeEdit::springForward(): use u'0' instead of QLatin1Char('0')
Pick-to: 6.5
Change-Id: I0c13c6b658cac3472d21b8d92b1e5eb73c094a7c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-04-14 15:19:02 +02:00
Edward Welbourne
4e69b6de4b Correct row names in tst_QDateTimeEdit::springForward_data()
The "{forward,back} to %s, correct to nearest" tests were reporting
the time of the transition as %s but, like the jump test, were using
the middle of the gap as the time to set. So compute that mid-time's
string once and use it in all three test names. Also renamed some
local variables to accommodate the new one for this text.

Pick-to: 6.5
Change-Id: Ic6c40c470fc74ae8bcfc0dc9d1596af06318a883
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 15:19:02 +02:00
Edward Welbourne
28c6868611 tst_QDateTimeEdit: correct computation of width of gap
Although the zone's daylight time offset is usually the width of the
gap, it's possible the transition is (or includes) a change to
standard time; so determine the actual gap width by comparing the
difference between time a day earlier and later to the usual duration
of two days. Also skip the test if the transition isn't really a gap.

Pick-to: 6.5
Change-Id: I56e381c9f74cfa1806d43b3ed5e4637436ebdf57
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-14 15:19:02 +02:00
Edward Welbourne
f06cc22509 tst_QDateTimeEdit: Use correct zone for findSpring()'s transition
The function is passed a zone to work in, so setting the transition to
local time made no sense; set to the given zone's time, instead.

Pick-to: 6.5
Change-Id: Icaa0955fe5fcd5bc257322afcb7e25e932dedd1b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2023-04-14 15:19:02 +02:00
Edward Welbourne
a076fdfec6 tst_QDateTime: Remove two duplicate test cases
Pick-to: 6.5 6.2
Change-Id: I36541b5c6f7c35deee9678e2f736e1db9f36039f
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-04-14 15:19:02 +02:00
Edward Welbourne
91fedd50f0 tst_QDateTime constructor: adapt the year check to vary year
We check three sample dates, in different years, so don't compare
their year() to 1970, but to their respective actual years. In the
process, package the arrays iterated for these checks into a constexpr
struct array and reverse them so that, instead of reverse-iterating
and indexing, we can use a ranged-for loop.

Change-Id: I214685346c637875a4ea31125c324851eb4308db
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:19:02 +02:00
Edward Welbourne
9aa87643d7 tst_QDate::startOfDay_endOfDay(): rename variables, add comments
The name final is suboptimal, given that it's also a keyword.
Rename initial at the same time.

The local-time parts of the test are apt to fail if local time
coincides with the zone being tested, as previously noted. Document
known cases of such coincidences, to help someone studying a failure
to know why it happened.

Change-Id: I1f1f302f161373a154066df210e03725b9a5f9ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:19:02 +02:00
Edward Welbourne
c8c5b8ac1a tst_QDateTime::addMSecs(): check for failure after calling helper
When the test failed, it did so in triplicate.

Pick-to: 6.5
Change-Id: Ia871aed0a5960120a2659a6778c10dccd4b2953a
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-14 15:19:01 +02:00
Edward Welbourne
ac653abc41 Name a numeric_limits locally to save verbose repetition
Change-Id: I443eb1f5a38e79a28827ac3e664100e6a23a9ef2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2023-04-14 15:19:01 +02:00
Edward Welbourne
d30d566f8d Minor tidies in the TZ time-zone backend
Taking the size() of a list before append()ing to it saves the need to
subtract 1. Add some missing assertions.

We can now use sliced(), rather than mid(), to trim a string or byte
array. We can do such trimming on a view, rather than allocating for
the trimmed part.

Change-Id: I8eff46ea6545a66c765c2d79aa1162c3044ca1cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2023-04-14 15:19:01 +02:00
Ilya Fedin
c3f00ce3e3 Revert "Gtk3Theme: set XCURSOR_SIZE and XCURSOR_THEME for wayland sessions"
This reverts commit c0b0c7bebb.

QPlatformTheme::MouseCursorTheme and MouseCursorSize was added in
qtbase a823366f77 and qtwayland client
supports it in 1c25db5e3f23d48e330170f41b94fbd532932b02.

Pick-to: 6.5
Change-Id: Icef2f50d495ac802e3a591d92c222523972b2066
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-04-14 10:36:42 +00:00
Tatiana Borisova
42d3e242fa Put timezone related code under ifdef
In case FEATURE_timezone=OFF auto-tests should still be built successfully

Change-Id: I0226a7d7781a412bf9e9935c2cf1a48b1ce427b5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-04-14 10:34:45 +00:00
Tor Arne Vestbø
9618427ee5 Revert "macOS: add default Edit menu items, if not added by AppKit"
This reverts commit d42cfeb84f.

Trying to help AppKit by adding the dictation and emoji edit menu items
ourselves resulted in sometimes adding the entries twice, when we failed
to detect the existing entries, or AppKit failed to detect our entries
as a reason to not add its own.

In addition, even if the entries we added were detected by AppKit and
AppKit was smart enough to not add its own, our entries were relying
on the developer to provide translation, instead of building on the
translations that AppKit already provides. And the keyboard shortcut
we set for our entries were not following system and user preferences
for which keyboard combination should trigger the entries.

Fixes: QTBUG-104709
Task-number: QTBUG-79565
Pick-to: 6.5
Change-Id: I3fabc41f85df917dbb669253ad441bccea8a5e35
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-04-13 20:54:46 +02:00
Amir Masoud Abdol
4b00aaae9c Add the missing include guard
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I6a46784fa65aecd48a7f59021c4942ed52321742
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-13 20:16:08 +02:00