70243 Commits

Author SHA1 Message Date
Ahmad Samir
2f35f69985 QFileSystemEngine: add a brief description
May be helpful for the next dev to read this code.

Change-Id: I26947984c67d21bd989883e5a9439e2675fec180
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-13 08:12:00 +03:00
Ahmad Samir
b6ab002b3b QFileSystemEngine: remove QFSMetaData* parameter from setPermissions()
Nothing passes a QFileSystemMetaData* to any of those methods.

Add QFileSystemMetaData::setPermissions(), which contains the code that
used to be in QFileSystemEngine::setPermissions(); callers can use it
directly to set the permissions on a QFileSystemMetaData object, after
the QFileSystemEngine::setPermissions() call succeeds.

Change-Id: I9f3415e969680f3b7039a7a8982032349e0133e1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-13 08:12:00 +03:00
Volker Hilsheimer
353ce5344f QMenu: don't show an empty menu
If a menu contains no or only invisible actions, then its sizeHint might
become invalid (depending on style), resulting in an invalid geometry.
In that case,  return early from popup(). Otherwise we try to show popup
window with an invalid size, which results in unpredictable behavior,
depending on the windowing system.

To minimize possible fallout from this change, don't return early from
QWidget::show (or QWindow::setVisible), but fix this locally in QMenu.

The QMenuBar test used empty menus to confirm that hovering over other
menu bar entries would highlight the menu bar entry under the mojuse,
and close the currently open menu. This can be tested better and more
reliably  with menus that are not empty, which is (probably) also going
to fix the test on wayland.

Pick-to: 6.8
Fixes: QTBUG-129108
Change-Id: Icc52528e89baefea04b3b27e6f02674bf74162b2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-11-13 06:12:00 +01:00
Thiago Macieira
89871438b4 moc: add a hidden --active-qt option for ActiveQt
So it doesn't have to clean up the output, which it may get wrong. It
doesn't want the qt_static_metacall function or the signal
implementations.

Change-Id: Ia0b110db8d5ef60020bdfffdbe547052dcff210e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-11-12 17:14:52 -08:00
Thiago Macieira
9ba20b9dc4 moc: simplify signal emission with a helper in QMetaObject
This moves the ugliness of the reinterpret and const casts to the helper
function.

From:
void QObject::objectNameChanged(const QString & _t1, QPrivateSignal _t2)
{
    void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
    QMetaObject::activate(this, &staticMetaObject, 2, _a);
}

To:
void QObject::objectNameChanged(const QString & _t1, QPrivateSignal _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1, _t2);
}

The overloads are disambiguated by the use of explicit template
parameter syntax. Note that zero-parameter void-returning signals remain
as they were.

Change-Id: I7b9d1870a8c80a49d207fffd00f79c6d9672cb54
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-11-12 17:14:50 -08:00
Thiago Macieira
adac50fbca moc: add a helper function to simplify IndexOfMethod
From:
       int *result = reinterpret_cast<int *>(_a[0]);
        {
            using _t = void (QObject::*)(QObject * );
            if (_t _q_method = &QObject::destroyed; *reinterpret_cast<_t *>(_a[1]) == _q_method) {
                *result = 0;
                return;
            }
        }

to:
        if (QtMocHelpers::indexOfMethod<void (QObject::*)(QObject * )>(_a, &QObject::destroyed, 0))
            return;

At the expense of a template instantiation.

Change-Id: Ieea308aedae6de4f0d94fffdcab6180485bd924f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-11-12 17:14:48 -08:00
Thiago Macieira
cecca90ff2 moc: fix support for generating meta objects for nested private classes
Amends commit da4a6cf78ff42a4f69c2775997ff174ef647f3f3 ("moc: generate
the uint data using the new constexpr functions"), which introduced the
constexpr way of generating the meta object contents. It did fix some of
the problems the old method from Qt 4.0 had but introduced another: the
qt_call_create_metaobject() template function wasn't necessarily friends
with the scope where the QObject-derived class was defined, as in:

class Outer
{
    class Inner;
};
class Outer::Inner : public QObject
{
    Q_OBJECT
};

This commit replaces said function as well as two of the static
variables in the global namespace that moc generated (qt_meta_xxx) with
static member template variables (for Q_OBJECT and Q_GADGET). Because
they are members, they automatically have access to the
qt_create_metaobject() member template function. Like it, they are
templated on the locally-defined tag type, to prevent unnecessary
exporting.

For Q_NAMESPACE, the current solution works, because no access
protection can apply. Trying to use template variables is more trouble
than it's worth and causes warnings-turned-errors in headersclean, for
example. This commit renames them, though, so the generator.cpp code is
common.

Fixes: QTBUG-129570
Change-Id: If8918852001be347fba9fffd5407faffb2bb45c1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-12 17:14:46 -08:00
Thiago Macieira
c17c69c2ed moc: bump the full output revision and remove old support
This removes the venerable integer generation at moc time that was added
in Qt 4.0, in favor of the generation at constexpr time.

Change-Id: Ia1238b1de442a329d739fffd91d1498cad70bfb9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-12 17:14:45 -08:00
Ahmad Samir
29a6cb3386 QtCore: don't use QString::utf16() where the string is \0-terminated
As requested in the code review, use str.data_ptr().data() to skip the
detaching check where we need a non-const pointer and it's immediately
clear the string isn't shared.

Amends 525aff168e30940f35ff5bca3192bd89614784f4.

Task-number: QTBUG-125871
Change-Id: Ib4df35fcbeac8778fbc2c5acfabdef52f9360df3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-11-13 02:48:04 +02:00
Michał Łoś
00cb46b61a Blacklist failing QNetworkReply test functions on VxWorks
We need to run COIN tests for VxWorks in a blocking mode, but test
functions of QNetworkReply:
 - chaining
 - getFromFile
 - getFromUnreachableIp
 - ioGetFromFile
 - moreActivitySignals
fail on VxWorks, the reason is yet to be examined.

We need to run tests on COIN for VxWorks as significant, and this test
prevents it, to reduce growing number of regressions and allow
iterative introduction of VxWorks as a supported platform.

Blacklist test functions of QNetworkReply failing on VxWorks.

Task-number: QTBUG-115777
Task-number: QTBUG-130740
Change-Id: I3ff5078e2d9073b3f90162a432e9033b0bd46b8f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-13 01:48:04 +01:00
Ahmad Samir
d3d395ab3d tst_QString: refactor one test
By using a lambda and QTest::ThrowOnFailEnabler; this required changing
the custom QCOMPARE in those tests.

Drive-by, use the UTF16 character instead of the hexdecimal
representation, one of them is easier to read.

Change-Id: Ic319cc2afdda6a73e293ebf16eb4f8df469b6d72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-11-13 01:48:29 +02:00
Ahmad Samir
68f970d285 QArrayDataPointer: add comment that !isMutable() indicates fromRawData()
Change-Id: Id0d6ab33140caec65828af6989eea6d15c0ec964
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-11-13 01:48:29 +02:00
Volker Hilsheimer
e770448a8c Android: fix warning from Java compiler about redundant cast
ConnectivityManager::getDefaultProxy already returns a ProxyInfo object,
no need to cast.

Change-Id: I808be775cb03d47c7bb1b20122597697f1f977a1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-11-12 23:30:59 +01:00
Christian Ehrlicher
81e74cfa26 QLabel: use QIcon instead QPixmap in internal data structure
... and let QIcon do all the scaling (and caching) stuff. This allows
us to pass a QIcon to QLabel.

Task-number: QTBUG-122403
Change-Id: I40f6338a38b75ddbdf909f98a8d18d6369d62acb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-13 00:30:59 +02:00
Christian Ehrlicher
02bf12072f Windows11Style: add styling for PE_IndicatorBranch
Add PE_IndicatorBranch so the correct arrows are used instead the
windows 10/vista ones.

Pick-to: 6.8
Change-Id: I5328a91b883078b4564890729f73dbfc573cbf00
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2024-11-13 00:30:58 +02:00
Paul Wicking
382fd3010b Doc: Move Easing Curve example into Graphics category
This example is for the animation framework (graphics),
it isn't about multimedia. Use the correct category.

Pick-to: 6.8
Change-Id: I32f0ce13a5496c8fbc871d8f2454575c25684eba
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-11-12 18:36:02 +01:00
Edward Welbourne
130e066868 Let QDateTimeEdit control the century to use for two-digit years
Amends commit 41f84f3ddb780ec751e3fc706dd242fc4a99de7a - in which I
neglected QDTE. It just needs to set defaultCenturyStart to its old
initial year to match the prior behavior.

Pick-to: 6.8
Fixes: QTBUG-126698
Task-number: QTBUG-46843
Change-Id: If1edafe25778ad064f8f4393c8b1b3bbf5c957dc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-12 18:32:14 +01:00
Frédéric Lefebvre
8a703b7110 Change for QTRY_COMPARE in flaky auto test saveAndRestore()
Auto test tst_QDockWidget::saveAndRestore() is flaky where
QCOMPARE(topLeft2, d2->pos()) is sometimes false where it should be
true.

Modify QCOMPARE for QTRY_COMPARE to give the necessary time to the XCB
thread to be proceed.

Remove the flakiness when testing on OpenSuse 15.5

Change-Id: I75cfdd8e4d432889a535d6ea72768ceab60d1118
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 16:30:54 +00:00
Michał Łoś
f1ce284409 Blacklist tst_QFont::familyNameWithCommaQuote data tags on VxWorks
tst_QFont::familyNameWithCommaQuote test fails for in line 789 on
VxWorks, when test runs with "weird", "commaSeparated" and
"commaSeparatedBogus" data tags. A call to QFontInfo::family returns
"weird" font name instead of standard font name as test expects.

The exact reason is to be found.

We need to run tests on COIN for VxWorks as significant, and this test
prevents it, to reduce growing number of regressions and allow
iterative introduction of VxWorks as a supported platform.

Blacklist failing data tags of familyNameWithCommaQuote tests on VxWorks.

Task-number: QTBUG-115777
Task-number: QTBUG-130738
Change-Id: Ie85c89392d48495226209b5aa76632dfb4c7bc25
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 16:42:17 +01:00
Marc Mutz
3e71f256d5 tst_QPromise: complete the port to RUN_TEST_FUNC
When we consolidated "all" test functions to use RUN_TEST_FUNC, the
cancel() test function was inexplicably overlooked.

This patch ports this last test function.

Amends 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b, whose commit message
contains rationale for this change, but not repeated here.

Pick-to: 6.8 6.5 6.2
Change-Id: I9461f8e816a25c731d6229df15ee88dcc8c4e165
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-12 16:42:17 +01:00
Michał Łoś
3a94084bc7 Blacklist flaky test of QPrinter for VxWorks
Test taskQTBUG4497_reusePrinterOnDifferentFiles of QPrinter is flaky on
VxWorks, failing between 2-5 times per 10 runs. This is due to VxWorks
being run on 32bit ARM emulator, which causes delays in test file
generation, and failing randomly on timestamp lines not covered by test
checks. Identical issue is reproducible on imx6 hardware.

Blacklist this particular test, as it blocks making VxWorks tests
significant on COIN.

Task-number: QTBUG-130742
Task-number: QTBUG-115777
Change-Id: Ib0799d8b3c0ff571f2165428d75c17a6f44736de
Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-12 16:42:17 +01:00
Volker Hilsheimer
33b134ff02 QCachedPainter: use the render hints of the painter we got
Amends 1ad9330a9c56a59d407f5644fe547ba69c1a205b. If the painter that we
get from the style (or the widget) has render hints set, then we want to
use those when drawing the cached pixmap as well.

This assumes that QPixmap as a paint device supports all the required
engine features, which it does as it's using the software rasterizer.

This fixes baseline test mismatches for QDial and QSlider, as those want
to be rendered using an anti-aliased painter.

Change-Id: Iaf9ec1c3a4f940f31fb34badc436e499e19f6698
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 15:31:51 +01:00
Toni Saario
60ca2b5696 Coin: Increase VxWorks stack size when testing
Change-Id: If8f263e52ef3f2177fac97afb602a2bc49cedad8
Reviewed-by: Simo Fält <simo.falt@qt.io>
Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io>
2024-11-12 16:31:51 +02:00
Toni Saario
6f6def28a7 Coin: VxWorks intel related instructions
Startup the correct emulator for each arch.

Add a health check for emulator during test start. If emulator
does not respond, restart it. Occurs in declarative tests where
tests hang and crash. After the crashes the pipes also need to be
reset, only emulator reset is not sufficient.

Read variables from WIND_CC_SYSROOT which is the VSB path, so
correct VSB is used.

Change-Id: If918ee45d4fa3a452c484a48fe9507f12f788e86
Reviewed-by: Simo Fält <simo.falt@qt.io>
2024-11-12 14:31:51 +00:00
Assam Boudjelthia
f1d8cc0291 Android: add Arabic translation for strings.xml
Change-Id: Ie39562b5e82cd60e47d91e0781607586efdfcb19
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-11-12 13:42:28 +00:00
Tor Arne Vestbø
f1efa7d60b macOS: Always propagate QCocoaWindow::setGeometry to NSView/NSWindow
We had an optimization that tried to avoid calling setFrame on the
view if the geometry had already been applied, but this logic could
fail if the NSView or NSWindow for various reasons did not reflect
our view of the world through QPlatformWindow::geometry().

One such case was when adding a NSToolBar to a window, in which
case we would end up with the wrong window size.

We now always propagate the geometry, under the assumption that
AppKit will handle the case of setting the same geometry as a noop.

We also pick up any geometry changes that happen during the initial
initializion of the window, even if we are not sending geometry change
events for those until the window is made visible. This ensures we
have an as accurate view of the native window state as possible.

Pick-to: 6.8
Change-Id: I76c753b6f4be8fdbb7a5f6ca3a8b91e013c0b36b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-11-12 14:42:28 +01:00
Michał Łoś
6899e072ed Blacklist tst_QTreeView::taskQTBUG_8376 for VxWorks
We need to block building COIN for VxWorks, but some issues which result
in failures are still to be addressed. Due to this, skip taskQTBUG_8376
QTreeView tests which fail on VxWorks.

Task-number: QTBUG-115777
Task-number: QTBUG-130743
Change-Id: I71a286753a792c732b041dc047fb5c8b259e7260
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-11-12 14:42:28 +01:00
Lars Schmertmann
cfefce57a4 Avoid linter warning "Obsolete Gradle Dependency" for androidx
This is a Qt dependency that the user cannot influence.

Pick-to: 6.8.1 6.8 6.5
Change-Id: I6efbfefb5901588f4c99b4edfa05b21b68ab01a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-11-12 14:42:28 +01:00
Tor Arne Vestbø
d3eca68744 Deprecate Qt::MacWindowToolBarButtonHint
It is an old remnant from the Carbon port, and has been a no-op since
Qt 5.

[ChangeLog][macOS] The Qt::MacWindowToolBarButtonHint flag has been
deprecated, as it has been a no-op since Qt 5.

Task-number: QTBUG-127634
Change-Id: Ibe0dee5bea423a2fd320806d2751326b3e4a4508
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-12 14:42:28 +01:00
Frédéric Lefebvre
1a848744dd Change for QTRY_COMPARE in flaky auto test tst_QShortcut::context()
Auto test tst_QShortcut::context() is flaky where
QCOMPARE(QApplication::activeWindow(), other1->window()) is sometimes
false where it should be true.

Modify QCOMPARE for QTRY_COMPARE to give the necessary time to the XCB
thread to proceed.

Remove the flakiness when testing on OpenSuse 15.5

Change-Id: I8332329a84cb2203ffdf1ff1b952efa6f87f3aef
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 12:25:30 +01:00
Frédéric Lefebvre
5d9accb70c Change for QTRY_COMPARE in flaky auto test tabBetweenSubWindows
Auto test tst_QMdiArea::tabBetweenSubWindows() is flaky where
QCOMPARE(qApp->focusWidget(), focusWidget) is sometimes false where it
should be true.

Modify QCOMPARE for QTRY_COMPARE to give the necessary time to the XCB
thread to proceed.

Remove the flakiness when testing on OpenSuse 15.5

Change-Id: Ibb0b67321c6000210379c7576bbbd7c39f7f0799
Reviewed-by: Lars Sutterud <lars.sutterud@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 12:25:30 +01:00
Frédéric Lefebvre
c00f56ffe0 Change for QTRY_COMPARE_GE in flaky auto test stretchAndRestoreLastSect
Auto test tst_QHeaderview::stretchAndRestoreLastSection() is flaky
where QCOMPARE_GE(header.sectionSize(9), biggerSizeThanAnySection); is
sometimes false when should be true.

Modify QCOMPARE_GE for QTRY_COMPARE_GE to give the necessary time to
the XCB thread to proceed.

Remove the flakiness when testing on OpenSuse 15.5

Change-Id: Iabe4ccb75a8963a762706d92bfb9de35a27fd2fe
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-12 12:25:30 +01:00
Eskil Abrahamsen Blomfeldt
3b5ecb95f0 Don't claim to return box engine for all fallbacks
The debug output for "returning box engine" was actually not
conditioned on returning a box engine, but was always printed
when picking fallback fonts.

Change-Id: I9e91731b5338ce2f7454ad6bfd11f413c027e01e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-11-12 11:52:36 +01:00
Oliver Wolff
922369844f qwindowssystemtrayicon: Fix position of popup window
The code in QMenu::popup relies on
QGuiApplicationPrivate::lastCursorPosition being up to date to decide
on the final position of the popup being shown. As cursor movements
outside of Qt windows do not trigger an update of that position, we have
to do a forced update of it in QWindowsSystemTrayIcon::winEvent.

Fixes: QTBUG-130832
Pick-to: 6.8 6.5
Change-Id: I45523688e21e294819337c69ad5b48eba5178446
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-11-12 08:06:37 +01:00
Thiago Macieira
15e8ac168c QMetaType: suppress most errors for metatype for references
We already print a static_assertion failure, but the compiler continues
expanding the code and produces a lot of "error: forming pointer to
reference type" messages after it.

Change-Id: I5fe61a5240ffac45b727fffd29bc5c1215619540
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-11-11 18:23:35 -08:00
Tor Arne Vestbø
1e7581fafb macOS: Take QT_SCALE_FACTOR into account when applying NSWindow geometry
Amends 31ec108dd08d6381a15e49b6fbec9337705c3b2a.

Fixes: QTBUG-131093
Pick-to: 6.8 6.5
Change-Id: I1fa947e9b4e15c18e4638f0374a9980b2ae2e571
Reviewed-by: Vladimir Belyavsky <belyavskyv@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-11-12 02:13:57 +01:00
Assam Boudjelthia
33ef9330f6 Android: fix potential null InputMethodManager object access
Ensure we don't end up calling methods from a null m_imm object
inside runAction(), the code was guarded outside the call but not
inside where it can still happen.

Pick-to: 6.8
Fixes: QTBUG-129684
Change-Id: I41d7e64a028f551bb53d177e16a77e7ae512a84e
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-11-11 22:00:42 +02:00
Joerg Bornemann
605913f9d7 CMake: Run configure tests lazily
qt_config_compile_test doesn't run the compile test immediately anymore
but just defines the test. Compile tests defined with this function are
run only if their value TEST_${name} is requested in a feature's
condition variable (EMIT_IF, CONDITION, ENABLE, ...).

If you need the TEST_${name} variable regardless of any feature
conditions, call qt_run_config_compile_test right after
qt_config_compile_test.

This avoids having e.g. Windows-specific compile tests on Linux (and
vice versa) and speeds configuration up a bit.

Fixes: QTBUG-115705
Task-number: QTBUG-107248
Change-Id: I38c4d2a48b1e5dc2f5133e0ad507ede0520ca3b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-11-11 21:00:42 +01:00
Johannes Grunenberg
1731d8af74 QWidget: clamp own rect in pointInsideRectAndMask
The rect of an empty widget (i.e. 0 width/height) will, after adjusting
by -1, be invalid as it will have a width/height of -1. In turn, calling
contains(p) on that rect can return true even though the rect is empty.

Fixes: QTBUG-131001
Pick-to: 6.8 6.8.1
Change-Id: I604f5942589f1c1079cae90bd0d3b104344d2c55
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2024-11-11 20:46:51 +01:00
Timur Pocheptsov
6026a5aa21 QIOSFileDialog: present image picker view without 'parent'
QFileDialog::show()/exec() can be called without having any parent
at all, so the check for 'winGuard' in authorization callback
would prevent image picker from being presented. In the end
we don't need this parent and using 'presentationWindow()' instead.
Check before asking for authorization that we indeed have/no
a parent window.

Fixes: QTBUG-130973
Pick-to: 6.8
Change-Id: Ie3ba285dfff82ac3f53245a032e133bc26763883
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-11-11 20:46:51 +01:00
Morteza Jamshidi
49543ffe1c Add Windows App SDK library path to the runtime
By adding Windows App SDK library path, it can be loaded from
that path so in order to run and debug the app via QtCreator, users
won't need to copy Microsoft.WindowsAppRuntime.Bootstrap.dll to the
build path.

Task-number: QTBUG-124800
Change-Id: I33b6ab2bf9ca3ef31ba729b660f134d491aa43ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-11-11 19:18:39 +00:00
Christian Ehrlicher
482c41fb61 QWidget: delete 'extra' in dtor
Call d->deleteExtra() in dtor of QWidget to make sure it's cleaned up
before QWidgetPrivate calls it which might access the already deleted
QWidget through deleteTLSysExtra() /
QWindowContainer::toplevelAboutToBeDestroyed(q).

Amends 006cbf658ea1f5986bbe1baafa7c146780320661.

Pick-to: 6.8 6.8.1
Task-number: QTBUG-130932
Change-Id: I9109072a457cc01abd5d1b4e844a3ed3309d942b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-11 18:34:08 +00:00
Christian Ehrlicher
1ad9330a9c QStyleHelper/QCachedPainter: don't use AntiAliased painting by default
Use AntiAliasing to paint pixel-exact is not good in most cases -
therefore don't set this attribute by default when using QCachedPainter.

Task-number: QTBUG-129680
Change-Id: I49111b57a777b8f5ea0baf6d736756277231ddfd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-11 19:34:07 +01:00
Axel Spoerl
6995709992 tst_Gestures::conflictingGesturesInGraphicsView(): use dynamic size
The test function assigns a hard coded rectangle to gestures and uses
the default size of a graphics view at the same time.
The leads to flakiness, where the gestures can't be delivered when their
size is out of bounds of the view's geometry.

Assign size size dynamically, according to the view's geometry.

Task-number: QTBUG-130811
Pick-to: 6.8 6.5
Change-Id: If75f59d15f84e610b4ec987daa2a06ce62539228
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-11 19:34:07 +01:00
Mate Barany
3045a08e5e Add type annotations to QLocaleXmlWriter
Also fix the annotation of englishNaming in cldr.py. Spotted it while
annotating __enumTable.

Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I93f698b4cf1b5ae90c21fe77330e4f167143a9f3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-11 19:33:44 +01:00
Alexey Edelev
c0b9dc0014 Add the missing check of IntegrityPlatformGraphics_REQUIRED_LIBRARIES
This will allow merging the updated toolchain, otherwise qt5 fails
to find OpenGL and friends. The whole block will be removed once the
toolchain file is merged.

Pick-to: 6.8
Task-number: QTBUG-128455
Change-Id: If355b1c6360dba7b3567023430785c6d109f9fe8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-11-11 20:33:44 +02:00
Joerg Bornemann
9f539ab9c1 a11y atspi: Fix wrong signal/slot connection
This amends commit 38251c36edf11316a2467169b1d491bf13520fd3.

QDBusServiceWatcher doesn't have a checkEnabledState signal. Use the
correct serviceRegistered signal.

Fixes: QTBUG-131009
Pick-to: 6.8 6.8.1
Change-Id: I3f0cdb53929c263d05438b1f5324b51163346d49
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: <ales.astone@gmail.com>
2024-11-11 18:33:44 +00:00
Pieter Dewachter
8717c1752f Improve performance of QTabWidget::clear
The current implementation of QTabWidget::clear is quite poor because it
deletes the tabs from first to last. When I was playing around, I found
out it's much faster to delete from last to first (with a lot of tabs it
goes from two seconds to 200 milliseconds in my testing). I assume this
has to do with the redrawing of all remaining tabs for each removeTab
call, while this is not necessary when removing in the reverse order.

Also, disable the stack widget's layout while we remove all tabs to
avoid unnecessary event posting, and disable updates of the stacked
widget as well as the tab bar.

Pick-to: 6.8
Change-Id: I04972de05ab71f98da7f74412aaadc69a36efc32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-11 19:33:44 +01:00
Inkamari Harjula
1393ece7c0 Add new icons for the tools doc front page template
Icons folder-32x32.png, paste_general-32x32.png, and web-32x32.png added.

Change-Id: I3b744f38a8654874a127eac6a161f38e52287ac6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-11-11 17:39:29 +02:00
Marc Mutz
b8500f3efc QString: toward UTF-8 arg() support [3/4]: add Q{Any,Utf8}StringView::arg()
This is the public API for the functionality already implemented in
pt.2 of this patch series.

We can now use UTF-8 format strings, but there's still no way to
interpolate UTF-8 strings into them.

[ChangeLog][QtCore][QUtf8StringView/QAnyStringView] Added
(multi-)arg() support a la QStringView/QLatin1StringView.

Task-number: QTBUG-124365
Change-Id: Ie887e3e89eee6cb997b41e381f143befaad1e08f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-11-11 14:57:43 +01:00