summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* | tst_QTreeView: cleanupChristian Ehrlicher2019-09-191-516/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations / replace with QTRY_foo() calls - use override - use QStyledItemDelegate Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | tst_QTreeWidget: cleanupChristian Ehrlicher2019-09-192-559/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeWidget autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I2c07e95871d8725366cddd5cd098010709c8dc55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QTextDocument: Fix device scaling for QTextFrameFormat margins, padding and ↵Nils Jeisecke2019-09-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | border Those values must be scaled to device coordinates - otherwise borders, margins etc. will be too small when rendered on high dpi devices (printers etc.). This change will add the scaling to those values. QTextDocument::print applies 2cm margins to the root frame of a unpaginated QTextDocument. Those margins were previously scaled to device coordinates in order to give the correct result. But because scaling is now done inside QTextDocumentLayout that scaling must be removed and pixel values based on qt_defaultDpi are provided instead. Fixes: QTBUG-78318 Change-Id: I6fe6dcc25f846341f6a2fe5df2f54baea473fdfd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | tst_QWidget::translucentWidget(): Pass with High DPI scaling enabledFriedemann Kleint2019-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 9c8d1ca18b48dbcc89dda1b9bacdf7d49c7fc754, the test would fail when High DPI scaling is enabled: FAIL! : tst_QWidget::translucentWidget() Compared QImages differ in device pixel ratio. Actual (actual): 2 Expected (expected): 1 .\tst_qwidget.cpp(8913) : failure location Set the device pixel ratio on the expected pixmap to fix this. Change-Id: I517495931c2c6b1f49125bb4b5836e304bdbf545 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | tst_QTableView: cleanupChristian Ehrlicher2019-09-141-730/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableView autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of c-style casts - use static invocations - use override - instantiate objects on stack instead heap to avoid memleaks Change-Id: I52fee26697b1732afa9f965e600d4c59551370ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_QTableWidget: cleanupChristian Ehrlicher2019-09-101-210/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableWidget autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of C-style casts - use static invocations - use override - instantiate objects on stack instead of heap to avoid memleaks Change-Id: I99ed144caab88d648d5ab987ce0963fbc6f1197d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-0/+10
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-0/+10
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * QShortcut: call base class implementation in event()Christian Ehrlicher2019-09-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QShortcut::event() did not call the base class implementation QObject::event() which caused that e.g. QEvent::DeferredDelete was not handled. Fix it by calling QObject::event() when the event was not handled. Fixes: QTBUG-66809 Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QGraphicsView: mark obsolete flag DontClipPainter as deprecatedChristian Ehrlicher2019-09-051-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The enum OptimizationFlag::DontClipPainter is deprecated and not used in the code since Qt4 times. Therefore also mark it as deprecated so it can be removed with Qt6 Change-Id: I318a55cf42e7a233d13d4ec0144e1977251f5c92 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Remove QOperatingSystemVersion::WindowsVistaSona Kurazyan2019-09-052-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minimum supported version is Windows 7. Remove QOperatingSystemVersion::WindowsVista added by b0cd007335853f283c47ffb0f5611d14e6dbe84b and replace with "true" wherever it was used. Change-Id: I08c0208467b655a921b6773f77d8bc099be69031 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * | Merge remote-tracking branch 'qt/5.12' into 5.13Paul Olav Tvete2019-08-201-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/configure.json src/gui/util/qtexturefilereader.cpp src/gui/util/util.pri tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
| | * Make the inputRejected test compatible with -no-feature-clipboardJames McDonnell2019-08-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for QNX is, by default, built without the clipboard feature. Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* | | Fix the build with disabled QGraphicsItem::ItemMatrixChangeSona Kurazyan2019-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::ItemMatrixChange has been deprecated since 5.14. Fixed the usage in tests to compile condinionally, only when it is available. Change-Id: I63e892a01a50fb9ac51bf38eb761cb26375bc194 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Pass QDate, QTime as value classes, rather than by const referenceEdward Welbourne2019-08-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can, of course, only be done in private APIs - but comment on public APIs to do the same at Qt 6. Change-Id: I3c79951572be3c37b0b0c5b1b05bced051a40964 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-2731-522/+449
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * | | tst_QGraphicsScene: Pass on High DPI screensFriedemann Kleint2019-08-241-20/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test requires High DPI scaling to be disabled since it captures widgets. Turn it off initially and introduce a member variable containing a suitable size depending on the screen to make the test pass on High DPI screens without violating minimum window widths on Windows. Change-Id: Ida9f306cff6abd48ee5de7001c7670a0da60c6c2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | Brush up tst_QGraphicsSceneFriedemann Kleint2019-08-241-315/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix includes - Add window titles - Introduce nullptr - Remove unneeded C-style casts in QCOMPARE - Replace remaining C-style casts - Use range-based for - Fix static invocation - Fix class structure, add override, use member initialization - Fix top level widget leaks and add a check - Silence debug output by using a logging category - Use Qt 5 connection syntax Task-number: QTBUG-76497 Change-Id: I77532a517353d04d1da43ce844988ee0ac2ffc7d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | Windows: Fix some widget tests to pass on High DPI screensFriedemann Kleint2019-08-234-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tst_QFrame and tst_QOpenGLWidget, force scaling off since they do screen captures which would fail with scaling activated due to different device pixel ratios. For tst_QGraphicsItem and tst_QHeaderView, force scaling on for Windows since some tests otherwise fail due to violation of the minimum size constraints of framed windows on Windows. The tests will then pass regardless of any environment setting of the scaling variables on a developer machine. Change-Id: Iefa4e84b433f7e51dce4e416546a9eda8ee6d0f1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | tst_QStyle: Remove unused baseline images (Windows Vista/macOS)Friedemann Kleint2019-08-2218-151/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test contained outdated baseline images for 1) Windows Vista: They were only used for OS version Vista and do not match any more. 2) macOS: They were apparently were not in use any more Remove the testing and image comparison code. Task-number: QTBUG-76493 Change-Id: I91cec5113db8d1845b43f97ad2987e63d9f86ac7 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * | | Remove the usage of deprecated APIs from QSysInfoSona Kurazyan2019-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced: QSysInfo::macVersion() -> QOperatingSystemVersion::current() Q_MV_OSX(10, 13) -> QOperatingSystemVersion::MacOSHighSierra Task-number: QTBUG-76491 Change-Id: Iae4f9c319ff16314fb04bbefaa48935a0f618007 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Update for failures only on dev branch. Use general platform namesDaniel Smith2019-08-197-34/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was generated with tooling from patchset 31 of https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive mode. General platform names were chosen if greater than 60% of the currently active platforms of a given type in COIN recently failed. Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | | Get rid of QWidgetBackingStoreTrackerTor Arne Vestbø2019-08-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat dubious use-case. The Symbian code is since long gone (ae30d7141), so the remaining pieces are just adding complexity to the already intricate workings of the QtWidgets backingstore/painting logic. Task-number: QTBUG-8697 Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | Add screen() accessor to QWidgetFriedemann Kleint2019-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Base it on QWidgetPrivate::associatedScreen(), but make a larger effort to find a screen in case the widget is not shown yet. Rename QDesktopScreenWidget::screen() to something else to avoid clashes. Task-number: QTBUG-62094 Task-number: QTBUG-53022 Change-Id: I36ba5ef5f0645a4ac89da0b38a391f7057b2f49c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-204-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Rename QWidgetBackingStore to QWidgetRepaintManagerTor Arne Vestbø2019-08-201-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting a blog from 2009, "this class is responsible for figuring out which parts of the window surface needs to be updated prior to showing it to screen, so it's really a repaint manager." https://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/ What better time to do the rename than 10 years later! Change-Id: Ibf3c3bc8c7df64ac03d72e1f71d296b62d832fee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Get rid of QWidgetBackingStoreTrackerTor Arne Vestbø2019-08-191-4/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat dubious use-case. The Symbian code is since long gone (ae30d7141), so the remaining pieces are just adding complexity to the already intricate workings of the QtWidgets backingstore/painting logic. Task-number: QTBUG-8697 Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 2e0b0be2ce30394269559590b42c81de27301ee6) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-152-21/+46
|\| | | | | | | | | | | Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
| * | QTree/TableView: allow to reset the sort order to natural sortingChristian Ehrlicher2019-08-132-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeView allowed to set the sort column to -1 which shows the data in it's natural order (when the model supports it). This functionality was removed during the porting away from the deprecated sortByColumn(int) functionality done in d0f909f8dbdd8594b0d950822f0e7ab8728da513 Readd the functionality and also allow it for QTableView. Fixes: QTBUG-77419 Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | | tst_QFormLayout: use QAutoPointer to simplify test and avoid leakMarc Mutz2019-08-132-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | ... in case of a test failure. QAutoPointer is private API, but here we can use it. Change-Id: I45b734385cd13fdea95d0100f2d8152f969612f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-133-12/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-122-11/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/write_info.pri Repair architecture config test for the WASM_OBJECT_FILES=1 build mode configure.pri tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
| | * Make test less dependent on moving the cursorMorten Johan Sørvig2019-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sendMouseMove() function calls QTest::mouseMove(), which again calls QCursor::setPos() to move the cursor. It then creates and sends a MouseMove event, using the constructor which picks up the global position by calling QCursor::pos(). On macOS 10.14, QCursor::setPos() may silently fail if the user does not grant the application permission to move the cursor (via a dialog). As result of this the mouse move event gets an incorrect global position. Provide the global position directly when creating the event to make sure it gets the correct value. Task-number: QTBUG-75786 Change-Id: I3e8df450fea802783a3d1dbe471753f502b42de3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QWizard: Account for missing background image on macOS 10.14+Morten Johan Sørvig2019-08-111-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were loading “Background.png” from the KeyboardSetupAssistant app bundle. As of macOS 10.14 that image is no longer there. Adjust auto tests and document the behavior. Change-Id: Icb4dd73b3fa88927e87bb86db2bc9f7b4a8094f7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * A GCC 4.8 build fixVille Voutilainen2019-08-081-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic128486711118e1124739e8dca30547ab8ba9816 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Fix GCC 4.8 buildVille Voutilainen2019-08-051-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I4994146b359e8e37f6c0fa1b27f03fb9e800fdd5 Fixes: QTBUG-77218 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove usages of deprecated APIs of qtbase/widgetsSona Kurazyan2019-08-0114-29/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. - Modify the tests to make them build when deprecated APIs disabled: * Make the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, add tests for the replacement Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Port users of get{Contents,Text}Margins() missed first time aroundMarc Mutz2019-08-014-20/+23
| | | | | | | | | | | | | | | | | | Done-with: Sona Kurazyan <sona.kurazyan@qt.io> Change-Id: I5b584cbe468429c53c2d661a0d7957d74e7ad691 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | tst_QMenu: Eradicate Q_FOREACH loopsMarc Mutz2019-08-011-4/+3
| | | | | | | | | | | | | | | | | | | | | In two cases, we now detach. ¯\_(ツ)_/¯ This is test code. Change-Id: I244f5e20dd923281049f38b76366163c16b6498c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-301-0/+47
|\| | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/mingw_make.cpp Change-Id: I2f790bc8572bd22fea01edf7ca74595b29f063eb
| * | Fix crash when the focus widget gets a focus proxy after the factDavid Faure2019-07-291-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QApplicationPrivate::focus_widget became a dangling pointer in the following scenario: A widget first gets focus and later on gets a focus proxy. QApplicationPrivate::focus_widget was still pointing to the initial widget. Upon destruction, QWidget::hasFocus() [which follows to the focus proxy and then compares with focus_widget] was therefore false for both widgets. So QWidget::clearFocus() didn't call QApplicationPrivate::setFocusWidget(0) for either of them. As a result, focus_widget remained set, and became dangling. In real life, this happened with a QWebEngineView, which the application gave focus to upon creation. At that time it doesn't have a focus proxy yet. That happens later, in QWebEngineViewPrivate::widgetChanged. https://bugs.kde.org/show_bug.cgi?id=381793 Change-Id: Ifee610bb76a2d4d2797b98ece9bffe5fffe3c6a6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QFileSystemModel: Remove model member variable from testFriedemann Kleint2019-07-271-48/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test instantiated and deleted a model in each test which is wasteful since not all tests use it. Remove it and introduce per-test variables instead. Task-number: QTBUG-76493 Change-Id: I1684ea5b8eac7b52bb99e830f723693c51e8b9a5 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QFileSystemModel: Brush up the testFriedemann Kleint2019-07-261-142/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Instantiate test helpers on the stack or use QScopedPointer - Remove C-style casts of enumerations/flags, use meta types - Port to Qt 5 connection syntax - Fix static method invocation - Use initializer lists for QStringList - Introduce a logging category for all debug output - Streamline code - Refactor cleanup() to operate on QFileInfoList which is faster and streamline - Remove unused variables Task-number: QTBUG-76493 Change-Id: I3a033af7c9ec4dac3149d2016104daad07797a4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-172-33/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-131-3/+3
| |\| | | | | | | | | | Change-Id: I5d2a4fa33b4aa22da39ac045e6b85ab940b8720b
| | * Remove unused arguments from QWidgetPrivate::create_sysTor Arne Vestbø2019-07-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The public QWidget::create still has them, but we don't need to propagate them on - that just makes debugging the window creation flow harder. The window argument to QWidget::create is technically used to guard an early exit in the function, but to keep behavior the same we leave it for now. Change-Id: Ic0287575aa25f1272e216adc1b75e34d6f55f6d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-121-30/+35
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| | * Make tst_QGraphicsItem painting tests most robustVolker Hilsheimer2019-07-101-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Counting absolute paint events is fragile, as there are no guarantees that a single call to QApp::processEvents only delivers a single paint event to a widget. As of QTBUG-76566, we see that the items occasionally receive three calls to paint, which can be simulated by activating other windows while the test is running and waiting for events to be processed. Instead, verify that we do receive any paint events as the first test, and then verify increments when we expect updates. This also reverts change 24b9424adcda1ab083fae4ae857007227ba5fee2. Change-Id: Ib51853e918f31acd3aea10d4109c95f34012a29f Fixes: QTBUG-76566 Reviewed-by: Dimitrios Apostolou <dimitrios.apostolou@qt.io> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| | * Further stabilization of QGraphicsItem::cursor testVolker Hilsheimer2019-07-101-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTest::mouseMove calls are not reliable, and seem to produce flakiness, at least on WinRT. Removing them, and only depending on handling of the synchronously delivered QMouseEVent for simulated mouse moves. Also, initialize the expected cursor shape from an empty scene; this avoids that showing the view with the cursor accidentially on an item results in the wrong default shape. Remove hard coded coordinates, just test what we know. Fixes: QTBUG-73545 Change-Id: I6f81d6b16bb613ec77aaa776d6a80aac739aeb58 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>