As discussed in the latest CMake API Review, we are deprecating the
FILENAME_VARIABLE variable name everywhere, and replacing it with
OUTPUT_SCRIPT.
[ChangeLog][CMake] The FILENAME_VARIABLE option of
qt_generate_deploy_script and qt_generate_deploy_app_script is now
deprecated, use OUTPUT_SCRIPT option instead.
Change-Id: Ic8be33eefbc48540166ea0fcf1d1948b052d4b8a
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
For tiny scanline lengths, even the initial offset to align on 16
bytes may overflow.
Fixes: QTBUG-109477
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I198c6fa5a2551a951893515f905bb7cc35479608
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Set the RUNTIME_OUTPUT_DIRECTORY for configure-time executables so
executable will be located inside the QT_BUILD_DIR. This allows to
re-build syncqt and make sure ithat ts binary is replaced and located
in the libexec directory.
Comment on how to rebuild syncqt. Configure-time tools reserve the
original tool name for the imported executable. To re-build syncqt use
'syncqt_build' target.
Task-number: QTBUG-109792
Change-Id: Id7d912b1d75d18d82cb2a69fbd62b89440120d78
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Only use an actual QPromise when the calculation will be async.
Change-Id: I5900c6498f56721dd04c4da204c0270492f52eee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When the qtMainLoopThread calls QSGThreadedRenderLoop::polishAndSync(),
it waits for the QSGRenderThread.
In the QSGRenderThread, QAndroidPlatformOpenGLWindow::eglSurface()
calls QtAndroid::createSurface() and waits for the "android main
thread" to return a valid surface.
When the "android main thread" now calls "runInObjectContext" (e.g. by
calling QtAndroidAccessibility::childIdListForAccessibleObject()) it
waits for the qtMainLoopThread and the program is stuck in a deadlock.
To prevent this, we protect all BlockedQueuedConnection from the
"android main thread" to the qtMainLoopThread by acquiring the
AndroidDeadlockProtector.
When QAndroidPlatformOpenGLWindow::eglSurface() already acquired the
AndroidDeadlockProtector we abort the current A11y call with an emtpy
or default value.
Note: b8a9527544 already tried to fix
this by checking "getSurfaceCount() != 0", but there are situations,
where a new surface is being created while an old surface is still
present.
Task-number: QTBUG-105958
Pick-to: 6.5 6.4 6.3 6.2 5.15
Change-Id: Ie40e8654c99aace9e69b0b8412952fa22c89f071
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
All current modules are free of qAsConst, make sure new ones will be,
too.
Change-Id: Iae3c67bca86eddf62ae664b00ff39a9b513d7290
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qt-cmake-standalone-test uses add_subdirectory call when evaluating the
project. This leads to an error if users try to use path to
CMakeLists.txt as an argument, instead of directory when configuring
standalone tests with qt-cmake-standalone-test. It makes sense to check
if the user-specified path points to CMakeLists.txt and cut the
filename part when calling add_subdirectory.
Pick-to: 6.5 6.4 6.2
Change-Id: I6b9ac0ca8323eaf11f219eb1e6bed3057120a231
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The standard accelerators page was deleted, drop the link to it.
Pick-to: 6.5 6.4
Change-Id: I2fa9a94200d0e5f8895bb8c6981c73b3e9dd159e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
These are time stamps, and they use toMsecsSinceEpoch(), no point
getting the time in Local time zone then converting it.
Change-Id: I2db2db5f9ebc062e65514a592fa7fa00cf1d179d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unify wording as "{Latin-1,UTF-16} string viewed by \a str".
Drive-by change: Fix a grammatical error, it's "a US-ASCII", not an
(because it's pronounced by the letter name "U" which is pronounced
like "you", so "a" not "an").
Task-number: QTBUG-108711
Pick-to: 6.5
Change-Id: Iff763f4008341c35317bb3d7a2a228767ff6a648
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Add internal documentation to header and implementation of
QGtk3Interface.
Pick-to: 6.5
Change-Id: I3e6e970afa0c2ab26e0ce9efe6285cad1edfdb94
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Remove duplicate 'for', and unify the article of NSWindow to "an".
Change-Id: Iccf762ac54e90816f61634404fb88c9fdd1a43e1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The example overrides QWidget::resizeEvent() without using the
QResizeEvent * argument. This results in a compiler warning.
This patch marks the argument unused.
Pick-to: 6.5
Change-Id: I647d0eda7d895e70ed6f232960aec992f5e37b6c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This is inherently faster than getting it in UTC from the underlying
native API stat call, then converting it to the Local Time Zone just to
compare them. The same goes for any use-case where you get a QDateTime
then the first thing you do is call t.to{Msec,Secs}SinceEpoch().
Change-Id: Ic13bcfd99b937c9f10f102ea7741832950a553c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
... instead of manual QPromise handling.
QtFuture::makeReadyFuture() is both more efficient and more readable.
As a drive-by, replace size() > 0 checks with !isEmpty().
Change-Id: I299fbe8e6be10d8f65b8f86fcc6b586ac3cbd9d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
The g_pendingPermissionRequestsMutex protects only the
g_pendingPermissionRequests QHash, so we can drop it immediately after
the QHash::insert() call. In particular, we don't use reference into
the QHash afterwards, and the following runOnAndroidMainThread() call
is internally synchronized, anyway.
Change-Id: I66a0e402e9ed1edb5fd9fec14e85f9371cc4fc36
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In 705665957b we started relying on the
input method to decide whether a key event should include the resulting
text or not, based on the assumption that text insertion would happen
via the insertText:replacementRange: selector.
But the NSStandardKeyBindingResponding protocol includes several other
commands for inserting content, including insertTab:, insertBacktab:,
and insertNewline:.
https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding
We explicitly handle the latter, but for any command we didn't handle,
we concluded that the input method didn't want us to insert text, and
sent the key event without text, which broke tab character insertion
in text edits.
As long as we're not handling these commands explicitly, we adjust
the logic to treat any command starting with "insert" as an unhandled
request to insert text, and forward it as a key event with the text
included, as before 705665957b.
Fixes: QTBUG-109754
Task-number: QTBUG-106393
Pick-to: 6.4 6.5
Change-Id: I4a164bc809c3606b43f267514a66ff017efeb4af
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are two ways to override whether shortcuts (key sequences) should
be shown in menus, QStyleHints::::showShortcutsInContextMenus() and
the Qt::AA_DontShowShortcutsInContextMenus application attribute,
but only the latter is checked by our own menu implementations.
This was confusing, as overriding the style hint had no effect.
It makes sense for the QStyleHint to be based on the platform style
hint, but since we also allows overriding it, the logic in QGuiApp
that initializes Qt::AA_DontShowShortcutsInContextMenus should be
based on the QStyleHint.
Note that the inverse relationship is not maintained, as the app
attribute should not affect the style hints.
This creates a somewhat awkward situation in terms of when you need
to override the behavior, so we might consider deprecating one of
the options.
Fixes: QTBUG-109590
Task-number: QTBUG-69452
Change-Id: I366c17ff00fd8ae10553bbfb88d162ffd2c8040f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Check if "-stagingDir" is passed from the command line before trying
to copy files to it.
Pick-to: 6.5
Change-Id: Id39882e4e955bd54328c8e747377b9d49f977378
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pass every line to parseVersionScriptContent to not break the
version script generator state. The parser doesn't collect characters
from comment block, so the line containing the 'ignore-next' ELFVERSION
tag produces empty buffer for the further parsing process. Call the
parseVersionScriptContent function even on empty buffers to make sure
that 'ignore-next' counts lines correcly.
Pick-to: 6.5
Fixes: QTBUG-109790
Change-Id: I5f77893462d397f6738a5da1af6ed8dd8a2df70a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If an item in a list view has a null icon, then the decorationSize gets
calculated as -1, -1. The style would then try to wrap the text to a
lineWidth of -1, ending up in an infinite loop in viewItemTextLayout.
To prevent that, don't set the HasDecoration flag of the style option
when the icon is null, and don't fall back ot the decorationSize unless
the flag is set.
Add a test for this particular item configuration. This also fixes the
widget baseline test with styles that don't provide all standard icons.
Pick-to: 6.5
Change-Id: I691db6abede9a9b2ad300f3ee7fbfdae5fb6097f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Since Qt 6.3.x, qBound() has started asserting that max > min.
This caused a crash in the QTextDocumentLayout code for assigning
widths to table columns that were sized using percentages, which
depended on previous qBound() behavior of just snapping to the
minimum size if max < min.
There are some specific conditions for this to happen: First
of all, the available width in the table must be too small to
fit all minimum widths (which is calculated based on content).
In addition, the requested widths have to be given as
percentages of the table width, and these have to add to
something lower than 100%. With these conditions, you may get
a case where the calculated percentage width of a column is
larger than the minimum width, but lower than the remaining
width in the table, causing the assert in qBound().
We simply accept the minimum width as the rule in these cases,
which matches behavior without the assert and which looks
correct when resizing the window to be smaller than the table.
Fixes: QTBUG-108183
Pick-to: 6.4 6.5
Change-Id: I16d18dd9b2e7a77fe86d1a353b426075b5050b8e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Worth it to emphasize this, as such a side effect from a const
accessor may well be unexpected.
Change-Id: I0b70d81927e0b66799cbe736ce5d488e2ec77ce0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
The device would be deleted before the image format handler, and hence
be a dangling pointer that could easily cause a crash if the handler
or codec would access it on destruction, e.g. for cleanup.
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I51d16b1feddc5945955ac75a2e8701233dba7b82
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Wayland omits optimizations tested in tst_QWidget::optimizedResizeMove()
and optimizedResize_topLevel() under certain circumstances, e.g. on
Ubuntu 22.04 / Gnome. This makes the test functions fail.
This patch skips the test functions on wayland platforms, if an
omission is detected.
This amends 2ec7a6322f.
Fixes: QTBUG-109746
Pick-to: 6.5 6.4
Change-Id: If0df6b1cf451a7f0dccfc1bb7411e895d7ae29a3
Reviewed-by: Liang Qi <liang.qi@qt.io>
The AppKit issue has been fixed in Ventura.
Change-Id: Ic2c0a0ed4ad52ef2d52410ec2c8ba061907cbe8e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
In faffaa7292 we limited our cursor update
workaround to key windows, but macOS also sends cursorUpdate events
to non-key windows with the NSWindowStyleMaskUtilityWindow style mask,
so we include this in our workaround logic from ae8e96d4c2. We
include NSWindowStyleMaskTitled in this check, as macOS seems to
require a window to be titled to treat it as a utility window.
Task-number: QTBUG-96374
Change-Id: I1c54da181acbe472c2f598fec37aeadada3956bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When a palette mapping is imported from a Json file, parsing errors are
logged with qCDebug. This prevents errors from being logged in release
builds.
This patch replaces qCDebug with qCInfo for Json parsing to make errors
visible when the logging category qt.qpa.gtk is activated.
Pick-to: 6.5
Change-Id: I3f92ecc3ab51f863f62ccef9f9061902320d3c3c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
The C toupper function is locale-dependent. Given the right locale
(Türkiye, e.g.), toupper(i) is either
- İ (LATIN CAPITAL LETTER I WITH DOT ABOVE; if representable) or
- i (unchanged; if it isn't)
The latter is clearly wrong. The former might be what is wanted, but
since most locales these days are UTF-8, Í will be unlikely to be
representable in char.
So I conclude that what's intended here is that i gets mapped to I,
even in the Türkiye locale, so use the new QMiscUtils::toAsciiUpper()
instead of <ctype.h> toupper().
Fixes: QTBUG-109520
Pick-to: 6.5 6.4
Change-Id: I6fee2fb15c2facae79f1727455180567698fed80
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
I don't quite see the relevance of this. We have explicit warnings
if versions don't match a bit below.
Pick-to: 6.5
Change-Id: I08253fb99313896adb2c13d193ed3ec3954fb0b0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
QWindow::requestActivate() is not supported.
This amends c95de359b4.
Task-number: QTBUG-107153
Pick-to: 6.5 6.4
Change-Id: I45f53b5e9de85049ca41cc139a78a82450f53bed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The test function used to flake on Linux occasionally.
8e6ede7cd1 provided a fix. While it
seemed to work, further analysis has shown that the root cause is
event sequence in case of multiple paint events.
This patch re-engineers the test function:
1. Allocate test widget on the stack instead of the heap.
2. Send layout requests posted by QHBoxLayout constructor and
QLayout::addWidget() before showing the widget.
3. Remove calls to QCoreApplication::processEvents().
They are unnessecary, because
- the size hint request counter is supposed to increase (by any number)
- QTRY_VERIFY processes events anyway until the counter increases or it
times out.
Pick-to: 6.5 6.4 6.2
Change-Id: I54998483725cbdd4899ba6f5469d7dae0980ab1d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
...to 'name'.
It's clear from the context that this is the name of a module.
Pick-to: 6.5
Change-Id: I07700a4413ceb12695c153e16d0a2dcded615d11
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
MSVC should deal just fine with a single argument macro, and this
prevents the silent mistake of passing a single argument to
Q_DECLARE_EXPORTED_LOGGING_CATEGORY which would result in
no error or warning, but without exporting the category.
Pick-to: 6.5
Change-Id: I4190027f8914ad1ef3957759f8e8c0e6cbd8ba97
Reviewed-by: Kai Köhne <kai.koehne@qt.io>