Having a simple Dear ImGui bridge is not just useful for the manual
tests, which do not have any other means to displays GUIs, but is
in itself an important exercise for the QRhi machinery.
Have a new manual test that exercises the built-in ImGui demo window.
Then use it in the displacement test for real, to replace the myriads
of key presses with on-screen sliders and checkboxes (with less code).
Change-Id: I296bafae2a5cce6fc7a447d97e68e5bcec15f451
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
...when presenting from the main thread.
Make resizing nice and smooth in application that render and present
on the main thread. This includes Qt Quick applications when ran
with QSG_RENDER_LOOP=basic, as well as QQuickWidget-based widget apps
and anything using the QRhi-based backingstore flushing, and plain
QWindow apps that use QRhi on the main thread.
Allow opting out with an environment variable (QT_MTL_NO_TRANSACTION),
following the existing patterns of some of the other backends (such as
QT_D3D_NO_xxxx). This can be handy in case it turns out setting
presentsWithTransaction is not desired in some very specific case.
Task-number: QTBUG-107198
Change-Id: Id0f4e5a509076dd24c03d243c4f098ddb139d7af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If a window is blocked by another modal window, and we decide that as
a result we should not propagate the close event, we need to also
report this back to the platform plugin, so that it can tell the
operating system to not close the window.
This is a problem on macOS, where the system doesn't natively support
transient parents being blocked by a window-modal window, so the OS
will still allow interaction with the title bar close button, resulting
in a QWSI close event being delivered.
Fixes: QTBUG-104905
Pick-to: 6.5 6.2
Change-Id: I09ff15b0fbb1002a8f9d83d932ca766ed510f0a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It doesn't showcase anything interesting that other examples
don't already show off.
Pick-to: 6.5
Change-Id: Ie95c3ddb3ff52b3beab54bd6fa75fb75ae5c7ba5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
We should encourage users to use the system cache directory.
We should also encourage users to not use the char* QString-ctors.
QStandardPaths::CacheLocation is documented to never be empty, so use it
in this manner.
Pick-to: 6.5
Change-Id: I1f050feda5b0a8e7c23fbed5db904bb0180b45f0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
They're small, not much to polish.
Pick-to: 6.5
Change-Id: Iada573504de557ab18381370bb9760b1f60cc2e4
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And expand the note in the openglwindow example to point to
hellogles3 as well.
Pick-to: 6.5
Change-Id: I2c0ee9b83fa59752d937c57eaf0194f0d0a8a7d9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
We never made use of it since its introduction in 5.0, and calling free
directly reduces the size of libQtCore by roughly ~100kb.
Change-Id: I7dbdac83c82fa38d1833a4677fc83ebe809a11ef
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
on Windows virtual keyboard sends characters through the textInput handler,
we can use the same mechanism as Android to create an offscreen
input element and send the characters from there.
Fixes: QTBUG-107139
Pick-to: 6.5
Change-Id: I84a143aedf93d22521fcfa368532eed8c0e7d002
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
This mimics the behavior displayed by the Cocoa window
Fixes: QTBUG-111436
Change-Id: I800fd15e870e54cf2c22ba5bd7f0c8b3f7f85bbf
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The idea being that hellovulkantriangle demonstrates the same things.
As a getting started tutorial hellovulkanwindow is the ideal example,
but then again QVulkanWindow is not something we want to promote much
in Qt 6.
Some of the docs are moved to hellovulkantriangle.
Pick-to: 6.5
Change-Id: Icbfff70b4a4c7e4c0863a937f3c16038c0b03fbe
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Because it is the least documented one, and compared to the other
Vulkan examples it does not add anything new, it just dives deeper
into Vulkan.
Pick-to: 6.5
Change-Id: Iecf3e04625fba256ea8134da57f54498ee2010db
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
QButtonGroup::buttonClicked(int) was deprecated in Qt5 and removed in
Qt6 so don't mention it in the documentation. Use the correct
replacement idClicked(int) instead.
Fixes: QTBUG-102131
Change-Id: I3d3cd90a2f1ed4a6484827bd882142a9a845d1c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The necessary QT_ENABLE_P0846_SEMANTICS_FOR is already provided by
qpoint.h) here. Add a test to confirm it works.
Amends 0e22001a3b.
[ChangeLog][QtGui][QVector2/3/4D] Fixed manual get<I>() calls
(Tuple Protocol) in C++17 mode.
Task-number: QTBUG-111598
Change-Id: Id4a118b6439c2d1471b921f8d92ee558f9902eab
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In C++17, unqualified lookup doesn't find function templates that
require ADL from a call with explicit template arguments, unless
another function template of that name is in scope (otherwise, the <
is parsed as operator less-than instead).
P0846, merged for C++20, fixes this to repeat the name lookup, parsing
the < as indicating a template.
We have API in Qt (Tuple Protocol for some types, e.g. QPoint) that
work for the purpose of Structured Bindings, but don't work for manual
unqualified calls when P0846 semantics are missing, and we're adding
more, to QVariant, so add a macro to handle the issue.
The macro simply declares a function template overload of the given
name for a throw-away struct, thereby bringing, for that one name,
P0846 semantics into C++17.
When we require C++20, we can drop this again.
Amends:
- fb6b7869e8 for QPoint(F)
- 8ae9431c79 for QMargins(F)
- 0e22001a3b for the rest
[ChangeLog][QtCore][QSize/F, QMargins/F, QPoint/F] Fixed manual
get<I>() calls (Tuple Protocol) in C++17 mode.
Task-number: QTBUG-111598
Change-Id: I2ffaef12c5bb6d82f75ce78a7c03c6789dfa0691
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
So far, the framele/tite-less window maximising has been done by
adjusting the MINMAXINFO to prevent them from covering the taskbar.
It does not work when moving the windows from one screen to another
using keyboard shortcuts, since the MINMAXINFO is that of the old
monitor. This moves the adjustment to the WM_SIZE message that occurs
after the window has been resized.
Pick-to: 6.5 6.4 6.2
Change-Id: I0d36fe5d2e8eaa0739414835b8d99a0b2ed44cf6
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This is useful for a lot of applications that render text coming from
sources which already support arbitrarily numbered lists (like chat
applications for example). Application-side workarounds usually have
significant overhead; and this feature has been requested multiple times.
It should be possible to both read and write HTML with the <ol start="x">
attribute, and read and write Markdown with arbitrary numbers for the
first item in a list.
[ChangeLog][QtGui] QTextList now supports specifying a start index using
the new QTextList::{setStart, start} functions. The HTML start attribute
on ordered lists in rich text documents is now parsed and used when
rendering a text list. Non-negative indices in markdown lists are now
also parsed and written properly. This allows starting a list with a
different number than 1.
Fixes: QTBUG-30407
Fixes: QTBUG-65384
Task-number: QTBUG-107562
Change-Id: Ib35b9378d9134ffedaa2d92f728b0984793aa7c1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Found by static analysis.
Change-Id: I416eb31736c8c5002fb4906aae4272e645f1916d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
At least on X11 this is a real hierarchy: slave devices come and go
as children of the master devices. The goal is to verify that this tree
and the output of `xinput list` are in sync. The model calls
[begin|end]InsertRows() and [begin|end]RemoveRows() as necessary to
attempt to keep the view updated.
Task-number: QTBUG-46412
Task-number: QTBUG-98720
Task-number: QTBUG-104878
Task-number: QTBUG-112141
Change-Id: I8a2252f041cd1de777eef225d0e7f0db5c90a706
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QXcbConnection::xi2HandleHierarchyEvent() calls xi2SetupDevices()
whenever the event tells us that a device was added or removed; but
until now, those instances were not getting deleted until application
exit. That was a memory leak, and also tended to get us confused when a
newly-attached device happened to reuse the same device ID of something
that was there before but had been removed in the meantime. Now, we hope
that QInputDevice::devices() will be in sync with reality as X11
presents it to us.
Amends da5dea807f6589f2ed0c etc.
Task-number: QTBUG-46412
Fixes: QTBUG-56214
Fixes: QTBUG-98720
Fixes: QTBUG-99331
Task-number: QTBUG-104878
Fixes: QTBUG-112141
Pick-to: 6.2 6.5 6.5.0
Change-Id: I573805a41a12850f94561a030071f1437c4dc37e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change the signature of stateChanged(int) to emit Qt::CheckState
instead. This was forgotten during Qt6 porting so we have to wait for
Qt7.
Task-number: QTBUG-104688
Change-Id: Ica2504e5b9ae68612de81524faed0f31c9b10402
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When we fixed the callers of toSQLTCHAR() to use the result's size()
instead of the input's (which differ, if sizeof(SQLTCHAR) != 2), we
exposed callers to the append(0), which changes the size() of the
result QVLA. Callers that don't rely on NUL-termination (all?) now saw
an additional training NUL.
Fix by not NUL-terminating, and changing the only user of SQL_NTS to
use an explicit length.
Amends 4c445ef0ba and
46af1fe49f.
Done-with: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Pick-to: 6.5 6.5.0 6.4 6.2 5.15
Change-Id: I6210b77e9417f46294df94cb32ab4134af8dc4c2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
All callers of Private::setKey() follow the call with one to
initMessageHash(), so move the call into setKey(). We can't remove
initMessageHash(), because reset() still needs to call it without a
setKey().
Pick-to: 6.5
Change-Id: I1fc8cd5cda90f1595cedcc323a4cee8baa7ce6a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Store the target architecture in the module information files under the
key 'built_with.architecture'.
Task-number: QTBUG-111158
Change-Id: Ida4cde3b15103773824a8d9d78f082540b806736
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Nullptr check was performed after aquisition of the d-pointer.
That acquisition crashes if nullptr is passed to the operator, so the
actual check was never hit.
This patch moves the nullptr check to the beginning of the method.
Fixes: QTBUG-112174
Pick-to: 6.5 6.2 5.15
Change-Id: If339e2de9ce2e33e10d925e79ca06b3854a24f76
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
create() for D3D11 performs a smoke test with creating a vertex shader
to ensure the created graphics device is actually usable for Qt's
purposes. When this fails, create() returns false. Qt Quick
automatically retries with the PreferSoftwareRenderer flag which
causes picking up the WARP device ("Microsoft Basic Render Driver").
Synchronize this behavior to the QRhi-based backing store so that
widget apps using QQuickWidget (or anything running QT_WIDGETS_RHI=1)
get this same behavior out of the box.
Pick-to: 6.5 6.4
Change-Id: Idff795401dbed8ba465102d075808010d421d34e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The implementation of the stream-based XML parser resides in
coreslib/serialization. Moving the rsslisting example there.
Task-number: QTBUG-110647
Pick-to: 6.5
Change-Id: I862909e767301250750b6ee0d8ac7e20d6bad2b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This example does not use libQt6Xml, remove dependency.
Task-number: QTBUG-110647
Pick-to: 6.5 6.2
Change-Id: Ida8c4df0e274cbc2e0a5f7151f18693d7e1c2401
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This example does not use libQt6Xml, remove dependency.
Task-number: QTBUG-110647
Pick-to: 6.5 6.2
Change-Id: I40e5976121ddc97a78b540d17784b3357b87adf7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Play Store now accept only app with target
SDK version set to 31 or above
Change-Id: I7f7fb677798c3f2d3ce327226ac13a69f0bab442
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
When talking about QMake project files we now refer to ".pro files"
instead of "profiles".
Pick-to: 6.5
Change-Id: Ia8d20a6a03b9076e97f45da272bb3f883febc796
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Qt requires them and will fail to build if it isn't met, so we don't
need to check for its support. These were public CMake and qmake
features, so to keep compatibility with existing they're hardcoded now
(only done for the C++ editions and for qmake only, as that's what Qt 5
did).
Change-Id: I7f354474adce419ca6c2fffd174814724f45f90b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
...the image to RGBA8888. Just mirror the first null check that is
done for the user-provided QImage. The same should be done for the
result of convertToFormat().
Pick-to: 6.5 6.5 6.2 5.15
Fixes: QTBUG-68884
Change-Id: I77091d7a2bc6e32d2aa292dc7650c1af091fcec1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Does what 711c55b632 did for
Vulkan, i.e. removes the there-is-more-than-one-swapchain
condition.
Fixes: QTBUG-109971
Pick-to: 6.5 6.4 6.2
Change-Id: If631748c50482389a3ef894823a1aaf1ebb38bee
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The previous example finished way too quickly and provided no real
value in regards to API understanding. Previously, QtConcurrent::map
was used, which was also used in other examples. We are now using
QtConcurrent::filterReduce to demonstrate other functionality.
Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Allows sharing tracepoints between modules so that they can share one
trace group.
Pick-to: 6.5
Change-Id: I8de6da6beef02b34700cc2ecb1fad0e72a00b7e0
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
A coming change to support streaming requires networking so having it
in corelib is dubious.
Pick-to: 6.5
Change-Id: Idc25abe23b5ed07823d749294796c9f318ef1744
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
systemEnvironment() to produce corrupted entries (mojibake) on Windows
if the environment contains characters outside of the ANSI character
set.
Pick-to: 6.2 6.5
Change-Id: Idd5e1bb52be047d7b4fffffd174db6c1024318dd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It'll be used by another struct in a subsequent commit.
Change-Id: Ia94c6ae3506f9ba6cba6b71a5839bff8b3a2ab1f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>