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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
ConnectivityManager::getDefaultProxy already returns a ProxyInfo object,
no need to cast.
Change-Id: I808be775cb03d47c7bb1b20122597697f1f977a1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
... 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>