Amend 4d90c4e74a by clarifying why
moving the QSingleShotObject to the receiver's thread is a good
idea. Move that logic into a separate function and use that also
for the string-based connection.
Optimize the implementation by delaying the timer creation until
after we have moved the QSingleShotTimer object to the target
thread, using a queued metacall if needed to create the timer.
This avoids the creation of the timer in the wrong thread and
then the recreation of the timer in the new thread when QObject
handles QEvent::ThreadChange.
To avoid that the timer is created when it has already expired in
real time, use a deadline timer and fire timeout immediately when
it has expired by the time we get the metacall.
Since the timerId might now not be initialized in the constructor,
initialize it to -1.
Augment the crossThreadSingleShotToFunctor test function by
deliberately not starting the thread until the deadline expired.
[ChangeLog][Core][QTimer] Single-shot timers with a string-based
connection are now started in the receiver's thread, not in the
thread that creates the timer.
Task-number: QTBUG-112162
Change-Id: I3fc94c34c21d9f644da41a2e4c2da479980b8580
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The original change from 2008 mentions that this was needed for
preventing a crash when searching the native file dialog, but
this has since been fixed.
Nor is the file needed to get localized native file dialogs,
as this is controlled by the combination of the app's supported
localization or CFBundleAllowMixedLocalizations.
And we don't do this for CMake projects.
Pick-to: 6.5
Change-Id: I3c9e5aee4707c019f733920eb088f8d84f8e4ee1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's quite flaky, and since we currently don't have FTP support
there's no point in making sure it works
Pick-to: 6.5 6.2
Change-Id: Ice01e8d36f2b7830813119da3513cc01ec005c46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When a tab was moved by dragging, the tab's rectangle was drawn empty,
without the tab text. When a tab was moved by animated snap back to
its original position, the tab text was already drawn on the original
position, while the rectangle was still moving due to animation.
Adds the enum value QStyleOptionTab::TabPosition::Moving
When this option is set, QCommonStyle draws the tab text at the
current position instead of the original home position of the tab.
The QMacStyle switches over the TabPosition enum. As a moving tab
is laid out like the last tab in the given orientation, the enum value
Moving is treated like End.
Fixes: QTBUG-112277
Change-Id: I42a2d9c269dadfe9819c12dbc69e3ae995a45b09
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The compilerRuntimeLibs now pays attention to if the user is running
MinGW, or LLVM-MinGW, before deploying the corresponding runtimes from
the Qt binary folder, or from the path if it cannot find any in the Qt
binaries.
[ChangeLog][QtTools][Windeployqt] Windeployqt now supports LLVM-MingGW
runtimes.
Pick-to: 6.5
Change-Id: I9c464cdb933795e491992f5d1adb18bcc7d69f02
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
This modifies 9e453dacc3 to make sure
that QPainter uses the adjusted DPR when doing the tile copying.
Fixes: QTBUG-99990
Pick-to: 6.5 6.2
Change-Id: Id9c7b5576d5036e20bb399f3c8b82d4a467dc70f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
MET is an alias for CET, so the test's attempts to detect whether it's
in CET can't distinguish them other than by checking the abbreviation.
Change-Id: Ibb467d9bb2d983ca16302111b54f664a614057c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It turns out that Alaska and The Philippines had historical offsets
exceeding 15 hours, prior to day-transitions to bring their dates in
sync with their respective sides of the international date line.
Change-Id: I48fdf3aa6d8c0bacb368d08316733a10ee11a281
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clarify that a zone whose territory() is AnyTerritory may simply not
have a known association, or cover several territories.
Added more \sa links to territory(), where relevant.
Fix some surviving uses of country for territory.
Split some long lines.
Pick-to: 6.5 6.2
Change-Id: I9196f785afed9bc185a459608c5d9361127401cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is now the official format for Files, when there's more than one,
rather than using space-joined lists.
Pick-to: 6.5
Change-Id: I4a6247fff0ece8ece2944178af38894fd5a2e1e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Replace the old abuse of other fields as comments, to be overwritten
by a later setting to a proper value, with actual Comment fields, now
that we have them.
Added a new comment to the valgrind files to say where they come from
in the upstream.
Pick-to: 6.5
Change-Id: I2edcfa2949fa9e59f3f67d3e578d8e5009854cf6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
The corelib/text/qt_attribution.json didn't mention the
time/q*calendar_data_p.h files which are also generated from CLDR.
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I768555d4623204245006897c45af58635761bfa1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
We rely on this function discovering extra fonts if we cannot find any
or only find poor matches for our font request. Whether that be because
we had only partially populated the fonts of a given family or because
the user specified a font using a localized name.
It's a copy-paste of the implementation in qwindowsfontdatabase
Fixes: QTBUG-111854
Pick-to: 6.5
Change-Id: I0dd97b68d84417a26ce82a46f39804b36602ed67
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The recorded images frequently show traces of a fading-out command
prompt window that is opened by the test execution. We evidently have
to wait longer for all window-level effects are finished.
Pick-to: 6.5
Change-Id: I50db54ff33bf4bb1ef7c480a4aede1d5de1618c3
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The gtk_fixed widget was used as a reference to obtain a fixed font
and HeaderViewFont.
This is a mistake, because the gtk_fixed widget is a container for
other widgets with fixed geometries and no layouting.
This patch makes the default style being used for a fixed font and, as
a drive-by, the combo box as a reference for a header view font.
A monospace based css provider as explicitly added to the style
context, in case a fixed font is requested. The provider is removed
afterwards.
Task-number: QTBUG-112896
Pick-to: 6.5
Change-Id: I6bfb2ee9e7befdd2102bdcc6e53ced954a024034
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
...instead of expecting whatever was set in initializeGL will persist.
Task-number: QTBUG-111304
Pick-to: 6.5 6.4
Change-Id: Ifcf75a3df9bed6a45d2e9264a5e3f32504b42313
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
...so we have core profile compatible GLSL code
in them. Just so one can run e.g. triquadcube with
-g -c (OpenGL with a core profile context).
Pick-to: 6.5
Change-Id: I585d3b4f0c7cd71ce7fae1fff4bf9a84cb7410da
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If not excluded, `VK_USE_PLATFORM_ANDROID_KHR` might end up being
undefined due to the order of includes.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ib7bbf42af319568bc39db0b9e5c796d25db3c364
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This should make it clear enough that the issue here is a quirk of
Qt::Key and not something otherwise special about case-change affecting
whether a character is in Latin-1 (for all that this is the root cause
of the quirk in Qt::Key).
Pick-to: 6.5
Change-Id: I80fa6b78a0d0c431401a3fea18edf6149de08b92
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
qtbase/c27d2a57a441f9a1ce760e71635bd4c96882249d caused the code
to go through QStandardItemPrivate::setItemData() which does
not handle the special treatment of Qt::EditRole completely.
In the constructor of QStandardItemData; map Qt::EditRole to
Qt::DisplayRole to fix this as is done in setData().
Adapt the existing tst_QStandardItemModel::getSetItemData() to check
whether both roles are received in the dataChanged() signal.
Pick-to: 6.5
Fixes: QTBUG-112326
Change-Id: I133d058bacc3388c612c5b4fb18b54f5ef5cb56f
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
Turn some of the static variables into private static data members to
avoid symbol duplication during the unity build.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I9e3ee18f6e85a0f806de77f753d89a45ceaff7ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There are several duplicate symbols defined across android source files.
For now, excluding the conflicting files allows us to continue working
on bringing unity build to CI. I added some explanation and TODO's on
what I think can be done for resolving the conflict.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic0b31c4ae845c69570ea5dd86316e5a795c166c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
A comment said how to do this, so I gave it a try. Added a note to the
instructions to save the next person to look at this from, as I
initially did, thinking the comment in the generated code had the URL
wrong.
It turns out that some of the newer additions to the IANA registry
have semantics elements that spread across several lines. I don't know
the XSLT magic to replace each newline in a value, along with its
preceding and following spacs, by a single space, so adapted the XSLT
to produce C++ raw strings to wrap these multi-line entries. That'll
produce somewhat ugly output, so left a TODO for the better solution.
Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: I7d5e968284e0f1da2ec990af9512c9b7cb886792
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In the process, break up a long line.
Change-Id: Iec50e3bf292da9a3d4aef22bf5c59f2008b35c1f
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A little reading leads me to learn that there are several variants, so
document which this one is; also note the accurate form of the
yearLength constant, and fix a mis-indented comment-end.
Change-Id: Ia1987dda9f4caee4e52c0cfd894976908c8f4b1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is invalid and might assert in the model (e.g. in
QConcatenateTablesProxyModel)
Pick-to: 6.5 6.2
Change-Id: I6602d8b9eca83ef6cae760944a999d55244bb181
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In Qt 5, the system font would resolve to MS Shell Dlg 2, which
was always an alias for Tahoma. Since it was not a real font,
but a so-called "logical font", it was manually added to the font
database whenever we detected that the system font was not
automatically enumerated.
In Qt 6 we modernized the selection of system font. This causes
real fonts, such as Segoe UI, to be selected as the default and
the manual adding of "MS Shell Dlg 2" to the font database never
happens.
However, "MS Shell Dlg 2" was still preferred as the primary
fallback font, but we now always failed to resolve it because
it wasn't in the font database. For many writing systems not
supported by the main system font, such as e.g. Thai, people
still expect to get Tahoma as the default, but we now return
an arbitrary font from the alphabetically ordered list instead.
To work around this, we avoid returning the non-existing logical
font, since this is no longer useful, and just return Tahoma
directly.
[ChangeLog][QtGui][Text] Fixed an issue querying a default font
for certain languages not supported by the primary system font.
Pick-to: 6.2 6.5
Change-Id: Iacc7a7e7742114efcd82620d0ed099dc4e897fc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is handy if you want to reserve if possible or just fill the
container right away if not.
Task-number: QTBUG-112227
Change-Id: I3d085c1ce2448150bc044c3513572e02161244f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Removing a few unused variables in auto tests that were triggering
`-Wunused-but-set-variable`.
Pick-to: 6.5
Change-Id: I74bd0d7335d8bddeb18687b18c8a8be965f9fa20
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit be09628e15.
because db346e711c avoids the issue
entirely by calling this code after connecting the event.
Task-number: QTBUG-43674
Pick-to: 6.5
Change-Id: I72f5b161208aa3691e194f4ba7782d288602bbf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This reverts commit 2991c66b75.
Reason for revert: it caused a regression with translucent Qt Quick windows. We need to find alternative way how to fix QTBUG-106583
taking into account QQuickWindow's own color property.
Fixes: QTBUG-112473
Fixes: QTBUG-112537
Fixes: QTBUG-111969
Fixes: QTBUG-112524
Pick-to: 6.5
Change-Id: I34258f4c8b045b63c8462e325b09fff927684223
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Just to make sure it runs with strict WebGL 1 implementations.
This cannot generally be a solution, naturally, so requiring
WebGL 2 is more likely the way to go, but in the case of this
example it seems the only thing we need is to resize the image
file, so we might just as well do that.
Pick-to: 6.5 6.4
Task-number: QTBUG-111304
Change-Id: I1b4a72ac1a7b94575bf1abd61c5aa722959c92e4
Reviewed-by: Inho Lee <inho.lee@qt.io>
Old Android Extras related classes were missing. Now added.
Fixes: QTBUG-111823
Pick-to: 6.5 6.2
Change-Id: Ib45daf687fc24a1c528f62da8ffe52422bea0b6b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
QComboBoxPrivate::itemIcon() wasn't checking for an invalid index,
unlike QComboBoxPrivate::itemText().
QComboBoxPrivate::setCurrentIndex calls updateLineEditGeometry,
which calls QComboBox::itemIcon, even for an invalid combobox.
Pick-to: 6.5 6.2
Change-Id: I5e6105ae56836cd237a91a405d331f1424f49b37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We only use monotonic clocks now (std::chrono::steady_clock). This
probably didn't work very well anyway.
Change-Id: Ieec322d73c1e40ad95c8fffd17465f06b5b2816f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This removes all uses of QDeadlineTimer::t2 member in the .cpp (so it
gets marked [[maybe_unused]]) and greatly simplifies the code.
Change-Id: Ieec322d73c1e40ad95c8fffd17465bd50c1113ea
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
You can't partially specialize a template function, so these
specializations for steady_clock only worked if the Duration parameter
was nanoseconds. This could have been solved with function overloads
instead, but I find the if constexpr code simpler to read.
Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd17468bd73fc2fe24
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This matches the work that was done for QElapsedTimer. The
QDeadlineTimer::t2 member is now always 0.
This also removes the last distinction of timer types. Originally I had
intended to use CLOCK_MONOTONIC_COARSE on Linux[1], but that created
more problems than was worth, so I abandoned the idea in 2016.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/159933
Change-Id: Ieec322d73c1e40ad95c8fffd17468b313798ef79
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit deletes the direct, low-level functionality that
QElapsedTimer has carried since it was introduced. Everything now uses
only std::chrono::steady_clock and std::chrono::nanoseconds.
QDeadlineTimer temporarily still uses qt_gettime(), which is moved to
qcore_unix.cpp.
Task-number: QTBUG-110059
Change-Id: Ieec322d73c1e40ad95c8fffd174641a469b1eee5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>