summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Don't set the mouse cursor for items that are disabledVolker Hilsheimer2019-07-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with widgets, items that are disabled should not receive any input events. Similar to QGraphicsScene, which ignores disabled items when handling mouse presses, the view should also ignore them when handling mouse moves to update the cursor. Since QGraphicsView only adjusts the cursors on mouse moves, reenabling an item that is currently under the mouse will not change the cursor. This is consistent with other changes of item attributes that would position the item under the mouse (such as moving it). The overhead of hit-testing items for every such attribute change would be too large, and applications can generate a mouse move event if they really need to adjust the cursor in all situations. [ChangeLog][QtWidgets][QGraphicsView] Ignore disabled items when setting the mouse cursor. Fixes: QTBUG-76765 Change-Id: Ifcd31fc0581e8421e58eeb436a55b031909eed7e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Stabilize QGraphicsItem::cursor and select_multi testsVolker Hilsheimer2019-07-081-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests send QEvent::MouseMove events to the view, but don't fully construct the event with both local and global position. Consequently, QMouseEvent will use QCursor::pos as the global position, which is unreliable, as QTest::mouseMove can not guarantee that the mouse really moves - when running the tests locally on e.g macOS, it never does. So instead construct the QMouseEvent with the trivially calculated global position. Change-Id: Ic4c914e3af7f15751545080d4743b06d3887cce8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | | Remove usages of deprecated APIs of qtbase/guiSona Kurazyan2019-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made 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, added tests for the replacement. Change-Id: Ic38245015377fc0c8127eb5458c184ffd4b450f1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fix a couple more uses of QWheelEvent constructors in testsShawn Rutledge2019-07-122-2/+2
| | | | | | | | | | | | | | | Change-Id: I0c9f08a243a823aff0bf21dfc14f78680e95d80f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Finish deprecating obsolete members of QWheelEventShawn Rutledge2019-07-1210-41/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.0, delta() and orientation() were already marked obsolete, but Widgets and tests have kept on depending on them all this time. We now start using alternative API so they can really be deprecated. All constructors except the newest one are also deprecated. The plan is for all events from pointing devices to have QPointF position() and globalPosition(), so we deprecate the other position accessors. [ChangeLog][QtGui] Obsolete constructors and accessors in QWheelEvent now have proper deprecation macros. What is left is intended to be compatible with planned changes in Qt 6. Change-Id: I26250dc90922b60a6ed20d7f65f38019da3e139e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | unblacklist passing testsDaniel Smith2019-07-0824-81/+101
| | | | | | | | | | | | | | | | | | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QTextBrowser: assume Markdown is UTF-8Shawn Rutledge2019-07-082-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | That's how CommonMark specifies it. The HTML codec-guessing algorithm was making it fall back to Latin1 in practice, which was screwing up any Unicode characters found in the markdown source. Change-Id: I4021adc4a68591ecfd56ef24971af53ce3e9c96d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-052-0/+12
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-052-0/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/generators/makefile.cpp Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-032-0/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
| | | * Skip flaky test on MacOS_10_12Dimitrios Apostolou2019-07-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the most flaky-pass test currently. It fails the first time it is run on MacOS_10_12, but succeeds all the following times. This happens extremely often, so disable it until the issue is resolved. Task-number: QTBUG-76566 Change-Id: I94359eceb91c3b958930424e6c8b5957fb3f1252 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * Update visible window's alpha when toggling WA_TranslucentBackgroundVolker Hilsheimer2019-07-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetPrivate::updateIsTranslucent sets the surface format of the window with the alpha based on the translucency attribute, so we need to call this function when the attribute value changes. The test can confirm that the window's requested surface format has changed, we can't rely on what is actually set, and don't have to rely on hard-coded values like 8bit alpha. While WA_NoSystemBackground needs to be set for WA_TranslucentBackground to have an effect, we can't clear the attribute when clearing translucency (as it might have been set explicitly). Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff Fixes: QTBUG-60822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Remove usages of QSysInfo's deprecated APIsSona Kurazyan2019-07-053-4/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QPainter: mark obsolete RenderHints as deprecatedChristian Ehrlicher2019-07-033-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are obsolete since Qt5 but not marked as such. Therefore add Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be removed with Qt6. [ChangeLog][QtGui][QPainter] HighQualityAntialiasing and NonCosmeticDefaultPen are marked as deprecated and don't have an effect anymore Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | tst_QShortcut: Remove test widget and other member variablesFriedemann Kleint2019-07-021-184/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the mainW, edit widget member variables from the test and use widgets instantiated on the stack in the tests. For the data-driven tests, use a static QScopedPointer, which is reset by a newly introduced TestEnd action. The book-keeping logic maintaining a list of shortcuts can then be removed. The setupShortcut() helpers are simplified and the special case TestWidget::SendKeyEvent is replaced by a lambda in keypressConsumption(). Task-number: QTBUG-76493 Change-Id: I15dfa86dfa0666ed8288b7190e37cdb862c261c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | tst_QShortcut: Brush up the code, preparing the extraction of a base class ↵Friedemann Kleint2019-07-021-230/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to QtGui - Use nullptr - Fix static method invocations - Use QString() instead of QString("") - Use override - Use member initialization - Remove unimplemented code related to status bars - Use Qt 5 connection syntax - Fix apparent oversights in ambiguousItems() and unicodeCompare(),where the 2nd shortcut was assigned to the wrong button - Use Q_ENUM for the enumerations which will output the value in QCOMPARE and automatically declare them to be a metatype - Use enums in helper function signature for clarity Task-number: QTBUG-76493 Change-Id: I0ed6ee7ee8dc2dbb48160a8383e6ed29164c3449 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of: * QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch(). * QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch(). * QDate::shortDayName() -> QLocale::system().dayName(). * QTime by QElapsedTimer, where the deprecated methods of QTime were used. - Modified the tests for the deprecated methods to be enabled only when the corresponding methods are enabled: when the deprecated APIs are disabled, the tests will be also disabled, and the compilation won't be broken. Task-number: QTBUG-76491 Change-Id: I4d565db2329e580c567aae511696eb1efe120843 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-011-0/+26
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-281-0/+26
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * Fix window shortcuts when a completer popup has focusVolker Hilsheimer2019-06-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completer popup has focus, making QShortcut direct to it's window rather than to the window the completer belongs to. As QShortcut handles the case for Tool windows that have a parent, but doens't do the same for popups. And they shouldn't be treated the same way, as a context menu popup for a e.g. text edit should in fact block the text edit's shortcuts while open. However, the completer popup is special, in that it explicitly makes the widget completes for its focusProxy, which is what we can use to fix this issue. Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af Fixes: QTBUG-4485 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-252-0/+74
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
* | | tst_QAction(Group): Brush up the testsFriedemann Kleint2019-06-282-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Use Qt 5 connection syntax - Remove C-Style casts Task-number: QTBUG-69478 Change-Id: Icf8faf3433ff3bff667db050e79b560b221867b0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-252-0/+74
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2019-06-101-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 81e298a51d08c510457b4a26b37c0d4aac5eba65 fixed a case where the focus chain was screwed up when the order was already correct. This worked correctly in most cases but not when the next focus widget of the first one had Qt::NoFocus. The optimization check if lastFocusChildOfFirst is the same as second is thrown away since it now does not longer screw up the focus chain and the save would only be four pointer assignments. Fixes: QTBUG-75388 Task-number: QTBUG-10907 Task-number: QTBUG-68393 Task-number: QTBUG-69619 Change-Id: I581ed532156c34ea970123afd063194aab016304 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Stabilize tst_qsplitterFrederik Gladhorn2019-06-192-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the worst fix ever, adding one more qWait. The test has been updated in the 5.13 branch, so there a different fix will be needed. For now this is in line with the rest of the code. This test is currently one of the worst offenders when it comes to flaky tests. Task-number: QTBUG-64639 Change-Id: Ia1e71cc948997408b9658839013c9ad098111033 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Overload QTextBrowser::setSource() to add optional type argumentShawn Rutledge2019-06-204-10/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that it's trying to guess whether the type is markdown based on the file extension, there needs to be a way to override it. For example it might be arranged that directory listings will be generated in markdown format instead of HTML; then when loading a source URL that is a directory, the application may override the type. The type for the single-argument setSource(url) is UnknownResource to preserve the existing behavior, but the user can override the guessing by setting a specific type. Change-Id: Id111efd24de7d8fd18c47b16a2d58f5b09d77891 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Support copy-pasting foreground images within same documentEskil Abrahamsen Blomfeldt2019-06-211-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a texture for foreground color in text and copy-pasting the text inside the same QTextEdit, the formatting would disappear. Fixing this in a general way would require implementing some other carrier format in the mime data than HTML, such as e.g ODF, but it can quite easily be fixed for the case where the data is pasted in the same document, or even different documents as long as they have a reference to the image in the formats. [ChangeLog][QtWidgets][QTextEdit] Added support for copy-pasting foreground brushes with textures within same document. Task-number: QTBUG-75931 Change-Id: I8b39dce289c64eea39e25cb8eb207e2534bcd2eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | test: migrate QFontComboBox test to QRegularExpressionSamuel Gaist2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: I2e1b42c09db88da64ec62aee7906f4c368e5bcbb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QAction: add exclusionPolicy propertySimone Gaiarin2019-03-191-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When set to ExclusiveOptional, the new exclusionPolicy property let the user uncheck the active checkable action in an exclusive group. [ChangeLog][QtWidgets][QActionGroup] Added new exclusionPolicy property. Set it to ExclusiveOptional to allow unchecking the active checkable action in an exclusive group. Change-Id: I61a9885cfd076d631cddf8c08313e4b488e5dc38 Fixes: QTBUG-71160 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-148-188/+200
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * | Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-111-4/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmintegration.h Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
| | * | QComboBox: add QT_DEPRECATED_X() for deprecated functionsChristian Ehrlicher2019-05-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_DEPRECATED_X() was not added with d6d33f0b80dd85043c71f71a3ed5485d6014e6c4 for the deprecated QComboBox functions - Add them now. Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-111-126/+129
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: Ic7c790602e4ac3f4a0d3d4630441b28cf76f75fc
| | * | Brush up tst_QCompleterFriedemann Kleint2019-06-071-126/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Fix warning about inconsistent parameter naming in CsvCompleter::pathFromIndex() - Fix C-style casts - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Use initializer lists - Fix the class declarations, use override, member initializations - Remove goto, streamline code - Use auto to avoid repeating the type - Introduce std::unique_ptr Task-number: QTBUG-38014 Change-Id: Ia8ecd799064d630648b385b606848d7474c51363 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Liang Qi2019-06-074-39/+47
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-074-39/+47
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoaintegration.mm Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
| | | * | Qt Widgets: Make tests pass on High DPI screens and scalingFriedemann Kleint2019-05-293-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the comparison helpers to do fuzzy checking of geometries. Change-Id: I00f4403f3bca2e8a3996e938a85ba799e083058c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * | Make tst_qwidget pass on High-DPI screens (Windows)Friedemann Kleint2019-06-031-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the fuzz check introduced by 63090627220a6209652d236cf991305fbeb188b8 to a shared header for reuse. Use it in in more places to account for rounding errors introduced by odd window frame sizes when scaling is active. - Use the test widget size to ensure windows do not violate the minimum decorated window size on Windows when scaling is inactive on large monitors. Task-number: QTBUG-46615 Change-Id: Icf803a4bc2c275eadb8f98e60b08e39b2ebebedd Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | | tst_QGraphicsView::cursor2(): Prospective fix for flakyness on WindowsFriedemann Kleint2019-06-071-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QTRY_COMPARE to fix recent fails like FAIL! : tst_QGraphicsView::cursor2() Compared values are not the same Actual (view.viewport()->cursor().shape()): IBeamCursor Expected (Qt::SizeAllCursor) : SizeAllCursor Task-number: QTBUG-76259 Change-Id: Ie9d4bbe45a3be6064ec88ee237360beb92a61481 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | Blacklist tst_QGraphicsView::cursor2 on WindowsShawn Rutledge2019-06-071-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's really failing only on Windows 10 it seems. Task-number: QTBUG-76259 Change-Id: Ieb541dc994a17e82478a5cc2643e0a89fd5aa97d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | Remove QLatin1Literal usagesGiuseppe D'Angelo2019-06-103-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QTextBrowser: detect and load markdown rather than assuming HTMLShawn Rutledge2019-05-302-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So we add the QTextDocument::ResourceType::MarkdownResource enum value to indicate the type. QMimeDatabase is generally unable to detect markdown by "magic", so we need to use the common file extensions to detect it (the same extensions as declared in the mime database XML). Change-Id: Ib71f03abd535c17e5a8c99bd92d0a6062e972837 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | tst_qtextbrowser: add markdown test data to TESTDATAShawn Rutledge2019-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's necessary to make the test pass on certain platforms. Change-Id: I717d492df437c0ffb75b21d9ef23ce602160fad1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-279-1083/+1175
|\| | | | | | | | | | | | | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-277-1073/+1159
| |\| | | | | | | | | | | | | | Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
| | * | tst_QMdiSubWindow::setSystemMenu(): Pass in High DPI/multi-screen setupsFriedemann Kleint2019-05-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window tends to grow to span screens in multi-screen setups; force it to be on the primary screen by showing it maximized in that case. Change-Id: I984ba7a4cd4abd1f862c59c8dca0e2275f44c724 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * | Brush up tst_QMdiSubWindowFriedemann Kleint2019-05-201-170/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Use Qt 5 connection syntax where possible - Ensure top level widget list is empty after each test, delete left-over menu bars and disable menu animations Change-Id: Ieeb943ea669cd139f1835088b816802e777a9676 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Make tst_qwidget_window pass on High-DPI screens (Windows)Friedemann Kleint2019-05-161-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a fuzz check (cf 63090627220a6209652d236cf991305fbeb188b8) and a minimum size similar to tst_qwidget to make the test pass on large monitors with or without active scaling. Change-Id: I5a9e28e38e1d007057894c349c94f0e6fe12009c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Brush up tst_QWidgetFriedemann Kleint2019-05-161-510/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Fix C-style casts - Fix redundant bool expressions - Fix else after return - Remove unnecessary casts to int from registered enums - Fix most signedness-related warnings - Use range-based for - Use correct static invocation - Set a title on shown windows to make it possible to identify slow tests - Fix the class declarations, use override, member initializations - Use Qt 5 connection syntax - Remove unused variables - Streamline code in some cases Change-Id: I1350b382b0b7d0f3198039fdc78892cfa1dd498d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>