Qt6 is binary incompatible with Qt5, no need to keep the old data.
Change-Id: I7fc4592a79ed0a8b79569926a31ef6deb5d3f983
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
With nested popup widgets, pressing a mouse button on the lower
popup will close the active popup. MouseMove events that are generated
before the button is released again should not have that button
included, as it is likely to result in incorrect state handling in
the widget. This change removes all buttons from the MouseMove event,
which is the second best option.
This is mostly consistent with the behavior when closing a popup and
no other popup remains. The widget underneath will get MouseMove
events without the respective button included.
This change doesn't include a fix for the final release event, which
should ideally also not be delivered to the remaining popup, as it
never got a corresponding press event. Qt has already reset the states
in which it stores which widget received the press event at the time
the release is generated, such as qt_button_down and qt_popup_down.
So we can't separate a release grabbed by a newly opened popup (which
we want) from a release to the popup that became active after closing
(which we don't want).
However, widgets can more easily work around this issue, and the risk
of breaking things by changing the code further becomes too high.
Change-Id: I603bbdbc7e7355952d96ab77c5e2d2f1e6f94987
Fixes: QTBUG-82538
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Images are rounded up to 4 bytes per line minimum, so one pixel wide
images might not shrink when resizing.
Fixes: QTBUG-83179
Change-Id: If72c94409e4c899c5ad05b2867f5f53a94d0580f
Reviewed-by: Christian Kamm <mail@ckamm.de>
This amends b3e4be2d8b.
When building testlib with QtGui linked:(use "QT = core-private gui"
in src/testlib/testlib.pro)
Undefined symbols for architecture x86_64:
"QAbstractItemModelTester::verify(bool, char const*, char const*, char const*, int)", referenced from:
QTestPrivate::testDataGuiRoles(QAbstractItemModelTester*) in qabstractitemmodeltester.o
Change-Id: Ideb10ddd6717fed8d9f91f75bbfc9d5a22104730
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
All 6 getters and setters were deprecated by doc comment \obsolete in
3c159957f8 (Qt 5.9). Now we will generate
compiler warnings too.
Change-Id: I94c6da607fa5758072af1287c9286b6c52179cfb
Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
The function qt_generate_module_pri_file did not take into account the
CONFIG_MODULE_NAME argument of qt_add_module.
This resulted in wrong file names and content, e.g. qt_lib_test.pri
instead of qt_lib_testlib.pri.
Fixes: QTBUG-83176
Change-Id: Id6991396cf9ea5a1d155aa15402c0d84a8a9d082
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
When the Wayland client plugin is in use, the capabilities
for the surface may report a minimum image count of 4. The
internal "maximum minimum count" of 3, was arbitrary and
only used for sizing buffers. To be more friendly to different
setups, we remove the restriction and use QVarLengthArrays
instead.
We also set the initial size of the buffers to 4 so that we
can run with Wayland without any resizing, but now the arrays
will also grow to be safe for cases where 4 is not sufficient.
Change-Id: Iba5434e84417d36b70f2655b152e816f04650ce4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
In 519ea72108, the minimum SDK
version was moved away from the AndroidManifest.xml, and when
the change was merged, we lost parts of the update to set
the minimum version to 23.
This redoes it in the remaining locations.
Change-Id: Iada8188d3c0c8ec0a4801c1d219640ecb3976753
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(This reintroduces c17a5cec19,
which was reverted in Qt 5 because it requires API level 23.)
This flag tells the app to use as much of the screen as possible
while still keeping system UI visible, and can be supported on Android
by using translucent system UI, similar to iOS.
What this does:
1. It changes the current fullscreen/not-fullscreen logic to
allow three states: fullscreen, fullscreen with translucent
decorations and not-fullscreen.
2. In order for it to work, we have to send the actual
screen geometry and available geometry, at least in the case
where the user needs to know the available geometry to
know the safe area of the window. So we get the real screen
metrics and pass these to the QPA plugin (API level 17, so
we can do that now that the minimum version is 21.)
3. Note that getting the insets and calculating the useable
area does not work for non-fullscreen windows, since Android
is quite inconsistent in this respect. So in this case we
just use the window size and origin of 0,0 for the available
geometry.
4. Since we are touching this code anyway, this patch also tries to use
more consistent wording (calling it "available geometry" everywhere
instead of desktop geometry in some places and just geometry in
others, etc.)
[ChangeLog][Android] Qt::MaximizeUsingFullscreenGeometryHint window
flag is now supported, and will make the window fullscreen, but keep
the system UI on-screen, with a translucent background color.
Fixes: QTBUG-74202
Change-Id: I4cc5ef9cc2a3bd22d4d8d2bb767c6ff8a3aa75c0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
When doing a shift-select while moving the mouse then the start point
should be based on the start of the current selection and not the
pressed position. If there is no current selection start index, then
we can safely depend on pressed position as this will be the previous
index pressed on.
This resolves an issue introduced by
e02293a76d when fixing QTBUG-78797
Fixes: QTBUG-81542
Change-Id: Ia66c42b220452fdcbc8cfccc05dbc8a3911c3f5e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
- Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils
- Moves related auto tests from widgets to gui
- Replaces QUndoAction with lambdas that do text prefixing
[ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt
Widgets to Qt GUI.
Done-with: volker.hilsheimer@qt.io
Fixes: QTBUG-40040
Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
and replace with QRegularExpression
Change-Id: Ic692fc0ea24da84dd4b6bb4c8a846c0fcc62c3cb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
If recent versions of libc++ are built with filesystem support disabled,
the filesystem header still is installed., The std::filesystem::path()
constructor is completely defined inline in that header, making the test
pass on such configurations, despite C++17 filesystem not being
implemented.
Test a call to std::filesystem::copy instead, which requires the actual
library implementation to be available as well (on recent libc++).
Change-Id: Id997ab75f3299d8431b13cad871f2901f4d9f6ed
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Remove usages of Qt::AA_UseHighDpiPixmaps from examples/.
This flag is now on by default, and can't be disabled.
Task-number: QTBUG-83092
Change-Id: Ie28622f816da2fe28d4ab272d45ea20bd051d5f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.4
Change-Id: I7f74af0dc774a2172ff59713613a706e80d5b2cb
Reviewed-by: Liang Qi <liang.qi@qt.io>
Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and
fix the API taking those to use const references rather than pointers
or const values.
Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QShortcut has only one widget specific feature, which is whatsThis; that
is just a QString, so the setters and getters can just as well be in
QtGui.
The widgets specific implementation of shortcut matching and of showing
the whatsThis balloon stays in QtWidgets, in the private implementation.
Using virtual functions in the private we can override the empty default
in QtGui, and by adding a virtual factory function in QGuiApplication,
the correct private is instantiated depending on the kind of application
running.
Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.
Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.
Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.
Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
as we raised the minimum requirement for harfbuzz to version 2.6.0:
* use new HB_SCRIPT values instead of tags
* get rid of deprecated (and no-more-used) callbacks
* replace deprecated hb_ot_tags_from_script() usage with a more
flexible and up-to-date hb_ot_tags_from_script_and_language()
Change-Id: I0eafdd2d2028c353fa3a93f5868efceccd364a70
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When topLeft and bottomRight are different in QAIV::dataChanged(), the
current implementation simply calls QWidget::update() without checking
if the affected cells are visible. This results in a big performance hit
when cells are updated frequently.
Now try to compute the exact update rect by iterating through the
modified indexes.
Fixes: QTBUG-58580
Change-Id: I97de567d494e40ed8cdb1ea1f5b3cf3a2f60455e
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
QByteArray doesn't like it.
Apply the same protection to QString, which we know uses the same
backend but uses elements twice as big. That means it can contain
slightly more than half as many elements, but exact half will suffice
for our needs.
Change-Id: Iaa63461109844e978376fffd15f9d4c7a9137856
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This reverts commit cf000d080c.
Reason for revert: This API is not needed (anymore) by qtdeclarative.
Change-Id: I8af604c2babe3afc11f183ddb3ce3a9038a456ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
QtQml needs the private just for one detail which nobody else should
need it for: Tracking additional dependencies and marking the binding as
dirty. Exporting the private requires hiding some variables and
providing accessors, to compile with MSVC - including the removal of
QVarLengthArray usage. Upside: The binding structure shrinks by 8 bytes
and the encapsulation makes it a little easier to change things without
breaking declarative, ... in the unlikely event ;-)
Also remove setDirty() from the public API as it's not needed by QtQml
and using it is dangerous, because it means that there's a risk of
somebody keeping a reference (count) to the untyped binding from within
the binding closure, which introduces a memory leak.
Change-Id: I43bd56f4bdf218efb54fa23e2d627ad3acfafeb5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When drawing multiple distinct (unconnected) lines (e.g. from
QPainter::drawLines() or a QPainterPath with alternating
movetos/linetos), the dash pattern should not continue from one to the
next, as it should when drawing a connected line (e.g. polyline).
Both the cosmetic stroker and the full stroker does it right, but the
fast rasterizing codepath got it wrong.
Fixes: QTBUG-83048
Change-Id: I3d090f7121726755a0e53cb66b99a5563ac0e1c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
A read-only text edit with Qt::TextSelectableByKeyboard shows a steady
cursor to indicate to users that they can select the text, but not edit
it. When the control receives focus, it doesn't turn on blinking, but
explicitly sets cursorOn to true.
When focus is lost, then cursorOn needs to be reset to false to make
the cursor disappear, even if the blinking (as indicated by the poorly
named cursorVisible variable) is not on.
Change-Id: I78408b5c50c6ede3f9a7128be7a31b9c6795cf9c
Fixes: QTBUG-83029
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Paint events are delivered with the client rect of the widget, and
this applies to paint-on-screen widgets as well. The same goes for
how the widget repaint manager tracks dirty rects. Internally we
were also calling paintOnScreen() with client rects, so the use
of geometry() in the resize handler was likely a bug/oversight.
Change-Id: I1312ccf77218d1162e0971e4cbabaa80f49c852c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Speed up the QSortFilterProxyModel filtering by only updating the
source_to_proxy entries which are really changed - When proxy intervals
are added or removed, it is not needed to update the proxy_to_source
indexes which were not touched.
Change-Id: I35459ff1b04f4610ec74f4b01d58a71832a9ae22
Reviewed-by: David Faure <david.faure@kdab.com>
This has better support for threaded use, and gets rid of bind use.
This requires emscripten 1.38.37 and above
Task-number: QTBUG-76891
Change-Id: Ic30a6820c2ce945c314751c06cfc356914a71217
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Qt Creator now has the option to use the litehtml backend as a
replacement for the QTextBrowser-based help viewer.
Fix a few issues that the offline style has with the litehtml renderer:
- Fall back to using an unordered list for the navigation bar.
- Remove the background image for #buildversion and adjust font size.
- Adjust the generated padding around code snippets.
Keep the script that switches the offline-simple.css style to the
full offline style (offline.css) for JavaScript-enabled browsers.
The litehtml backend in Qt Creator will handle this switch internally.
With these changes, the generated offline documentation looks
acceptable when rendered with QTextBrowser, litehtml, or desktop
web browsers.
Fixes: QTBUG-82567
Change-Id: I86b179b1985b7ef54feddab30cb227b28021efe5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>