summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* macos: Rename macos style to macOSRichard Moe Gustavsen2020-09-111-1/+1
| | | | | | | | | This change shouldn't matter much to widgets, since style names there are case insensitive. But for controls style names are case sensitive, and in that case, "macOS" looks more correct. Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-1143-185/+197
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-103-9/+9
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Blacklist tst_qcolumnview::scrollTo on macOSUlf Hermann2020-09-091-0/+3
| | | | | | | | | It flaky fails for both normal and reverse cases. Pick-to: 5.15 Task-number: QTBUG-41341 Change-Id: If6ecd6dc58f131bb67d46a5d508f59b6bb0fd962 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Refactor testlib touch functions into qtestsupport_gui and _widgetsShawn Rutledge2020-09-081-6/+6
| | | | | | | | | | | | | Because we removed public setters from QTouchEvent and QEventPoint in 4e400369c08db251cd489fec1229398c224d02b4 and now it's proposed to give QEventPoint a d-pointer again, the implementation of QTouchEventSequence needs to start using QMutableEventPoint: being a friend will no longer be enough, because the member variables won't be accessible in the future. But because we have separate test libs for Gui and Widgets, it needs to be further refactored into two classes. Change-Id: I0bfc0978fc4187348ac872e1330d95259d557b69 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qmenubar: stop doing math on an enumGiuseppe D'Angelo2020-09-071-1/+1
| | | | | | | Cast to the right datatypes. Change-Id: Ia1ba9be1b0530263e810b50408f432dca485744c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qshortcut (x2): use op | instead of op + to combine keysGiuseppe D'Angelo2020-09-071-53/+53
| | | | | | | | | | | | | | Following the introduction of QKeyCombination, reduce the number of warnings raised by the test. Drive-by, remove some pointless math like Qt::SHIFT+0, which does not make any sense and would actually fail to compile (shortly). Refactoring the test to fully use QKeyCombination (instead of ints) is left as a future exercise; some QKeyCombination->int warnings are still around. Change-Id: If825bc4c369986623447927bb11493c4f58b544f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deliver Quit event when calling QCoreApplication::quit()Tor Arne Vestbø2020-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of QCoreApplication::quit() directly calling exit(0), which would leave QGuiApplication and client code out of the loop, we now send the Quit event, and let it pass through event delivery, before finally ending up in QCoreApplication::event(), where we call exit(0). This has the advantage that QGuiApplication can ensure all windows are closed before quitting, and if any of those windows ignore the close event the quit will be aborted. This aligns the behavior of synthetic quits via QCoreApplication::quit() with spontaneous quits from the platform via QGuiApplicationPrivate::processApplicationTermination. Clients who wish to exit the application without any event delivery or potential user interaction can call the lower level exit() function directly. [ChangeLog][QtGui] Application termination via qApp->quit() will now deliver Quit events to the application, which in turn will result in application windows being closed as part of the application quit, with an option to cancel the application quit by ignoring the close event. Clients who explicitly want to exit the application without any user interaction should call QCoreApplication::exit() explicitly. Task-number: QTBUG-45262 Task-number: QTBUG-33235 Task-number: QTBUG-72013 Task-number: QTBUG-59782 Change-Id: Id4b3907e329b9ecfd936fe9a5f8a70cb66b76bb7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QStyleOptionGraphicsItem: remove deprecated member matrix/levelOfDetailChristian Ehrlicher2020-09-061-1/+0
| | | | | | | | QStyleOptionGraphicsItem::matrix and levelOfDetail are deprecated and not used anywhere anymore. Change-Id: Id4b0fa8ac3ac53d771e858ecda5524a5e690342d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change QWidget::enterEvent signature to take a QEnterEventVolker Hilsheimer2020-09-052-4/+4
| | | | | | | | | | | | | | | | | | | This is a source incompatible change for widget implementors. Leaving the old enterEvent as a virtual overload is problematic due to shadowing. Best to make a clean cut, widget reimplementors will get a compile time warning if they mark their override as such, or if they try to call the parent class implementation. Addresses ### Qt 6 comment. [ChangeLog][QtWidgets][QWidget] The virtual enterEvent handler now receives a QEnterEvent, which contains information about mouse position and button states, rather than a plain QEvent. Change-Id: I233f594fd79c0c090983b3db8532913d00132fde Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Extend test blacklisting from Ubuntu 18.04 to 20.04Tor Arne Vestbø2020-09-032-0/+2
| | | | | | Task-number: QTBUG-86187 Change-Id: I3ac3233f7355d1c16bc9bf6e052fdf4bd9ea90de Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTable/TreeView: fix sortByColumn() when view is already sortedChristian Ehrlicher2020-09-022-0/+69
| | | | | | | | | | | | | When the view was already sorted by the column and order given to sortByColumn(), a resort was not triggered which is a regression since d0f909f8dbdd8594b0d950822f0e7ab8728da513. Therefore don't rely on sortIndicatorChanged() in this case and trigger an explicit sort as it's done when no user-triggered sorting is enabled Fixes: QTBUG-86268 Change-Id: I3ec30ab81f304d5a19cef6d67b8a81c21b4a112d Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Deprecate and remove uses of AA_DisableHighDpiScalingTor Arne Vestbø2020-08-311-9/+2
| | | | | | Change-Id: Ibadce68775858c524b998aacad310905ba2c2e8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Use build-system to declare tests that are low-DPITor Arne Vestbø2020-08-2811-22/+6
| | | | | Change-Id: I6da7204683b3c46232cfc542ed5e28131a82e87d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* High-DPI: Remove usage of Qt::AA_EnableHighDpiScalingTor Arne Vestbø2020-08-282-8/+0
| | | | | | | | This attribute is now on by default. Change-Id: I7c9d2e3445d204d3450758673048d514bc9c850c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Mark some Qt namespace enum members properly as deprecatedEdward Welbourne2020-08-271-1/+0
| | | | | | | | | | | | | | | | A comment is not good enough, Some of the enum members were even still in use, or mentioned in documentation. WA_ContentsPropagated, WA_WState_DND and WA_ForceAcceptDrops have been deprecated since 4.5.1; and at least the last has been an \omitvalue in the docs for even longer. (WA_ShowModal and WA_GroupLeader have been similarly marked, but are in use, see QTBUG-85816.) Push back to 5.15.1 in order to be able to remove these at Qt 6. Pick-to: 5.15.1 Change-Id: I6ea3839767e5f5158b0fed508f65798470191908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace QAbstractItemView::viewOptions with initViewItemOptionVolker Hilsheimer2020-08-265-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | viewOptions returned a QStyleOptionViewItem object. Such a method can never support newer versions of the option structure. Most styleable QWidget classes provide a virtual method initStyleOption that initializes the option object passed in as a pointer, e.g QFrame, QAbstractSpinBox, or QComboBox. Follow that API convention, but name it initViewItemOption, as the QStyleOptionViewItem struct contains information about the item as well as the widget itelf. This is a source incompatible change that will go unnoticed unless existing subclasses mark their overrides as 'override', or call the removed QAbstractItemView::viewOption virtual function. [ChangeLog][QtWidgets][QAbstractItemView] The virtual viewOptions method that previously returned a QStyleOptionViewItem object has been renamed to initViewItemOption, and initializes a QStyleOptionViewItem object that's passed in through a pointer. Change-Id: Ie058702aed42d77274fa3c4abb43ba302e57e348 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-264-5/+5
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename confusingly named QFont/QPalette::resolve overloadsVolker Hilsheimer2020-08-253-42/+42
| | | | | | | | | | | | | | | Having three methods with the same name doing different things is unnecessarily confusing, so follow the standard naming convention in Qt and call the getter of the resolve mask resolveMask, and the setter setResolveMask. These methods were all documented as internal. The publicly documented resolve() method that merges two fonts and palettes based on the respective masks remains as it is, even though 'merge' would perhaps be a better name. Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QFileSystemModel into QtGuiVolker Hilsheimer2020-08-259-1260/+11
| | | | | | | | | | | | | | This requires a QAbstractFileIconProvider in QtGui, as the standard QFileIconProvider depends on QStyle, and cannot be moved out of QtWidgets. QAbstractFileIconProvider returns strings for file types, but returns no icons yet. Support for a default icon set might be added in a follow-up commit. Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7 Fixes: QTBUG-66177 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-242-22/+22
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QStringRef and remains to Qt5CompatKarsten Heimrich2020-08-201-1/+1
| | | | | | | | | Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_qplainttextedit: Do not use paste() method with no clipboardCristian Adam2020-08-191-0/+4
| | | | | | | | | On QNX the test fails to build because there is no clipboard feature and the code is using the paste() method which doesn't exist. Task-number: QTBUG-83202 Change-Id: Ie070ec8850b528e122e954074a1a0a3c78a14248 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Introduce QWidget::setScreenVolker Hilsheimer2020-08-171-0/+24
| | | | | | | | | | | | | | | | | | Follows the QWindow semantics, and is a replacement for creating a QWidget with a QDesktopScreenWidget as the parent. We can now remove much of the special handling of QDesktopWidget and the Qt::Desktop window type, and get rid of QDesktopScreenWidget. Add a manual test that allows local testing. Our CI environments only have a single screen, and no multi-head display server setup which is the primary case where QWidget::setScreen is interesting. For the more common case of a virtual desktop, QWidget::setScreen has no real impact (just as QWindow::setScreen doesn't). Change-Id: Id0099e069d316741bacd8c795c396ccad37be297 Fixes: QTBUG-85483 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove QVariant(int type, void *data, ...) constructorLars Knoll2020-08-151-1/+1
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-145-13/+13
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use the new support for comparisons in QMetaType for QVariantLars Knoll2020-08-131-1/+4
| | | | | | | | | | | | | | Remove the compare method in the QVariant::Handler struct. Rely on the generic support provided by QMetaType instead. [ChangeLog][Important Behavior Changes][QVariant] QVariant will now use builtin support in QMetaType to compare its content. This implies a behavioral change for some graphical types like QPixmap, QImage and QIcon that will never compare equal in Qt 6 (as they do not have a comparison operator). Change-Id: I30a6e7116c89124d11ed9052537cecc23f78116e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make QFontDatabase member functions staticEskil Abrahamsen Blomfeldt2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabase is a singleton and all instances would share a single, mutex-protected global data pointer. But some functions were implemented as non-static functions. This caused a lot of code on the form QFontDatabase().families(...) since there was no static access. Other functions were implemented as static. To consolidate, we make all functions static. This should be source-compatible, but not binary compatible. [ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in principle static, but previously not implemented as such. All member functions have now been made static, so that constructing objects of QFontDatabase is no longer necessary to access certain functionality. Fixes: QTBUG-83284 Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Add missing enumeration case in tst_QMacStyle::setSizeTor Arne Vestbø2020-07-291-0/+2
| | | | | Change-Id: Iade36b03c6f8bdaa8feb82ef89744a399f92e21d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix misplaced nullptr, used for a flag valueEdward Welbourne2020-07-271-1/+1
| | | | | | Task-number: QTBUG-85700 Change-Id: I34b1aa8430842d96eb515d709b49de4e60976ac9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix warnings about unused variables and functions in testsTor Arne Vestbø2020-07-263-12/+3
| | | | | Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QGraphicsSceneIndex::clear: Don't assume only one repaintTor Arne Vestbø2020-07-231-1/+1
| | | | | | Change-Id: I037b51ebad525ced536945b2c39b0f59280e6bad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qnsview: don't active QWindows inside NSWindows that are not keyRichard Moe Gustavsen2020-07-222-0/+31
| | | | | | | | | | | | A QWindow should only become Active when it's inside an NSWindow that is Key. If the NSWindow is not key, we need to wait for it to be so, and handle window activation from QCocoaWindow::windowDidBecomeKey() instead. Otherwise Qt will report a QWindow as Active when, in reality, it is not. Change-Id: Ib7e63b374f26af527a668c7f7d863c4168a4446d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTestlib: Enable comparing QList against initializer lists/arraysFriedemann Kleint2020-07-212-43/+41
| | | | | | | | | | | | | | | | | | | | | It is unnecessary to create a QList container just for comparison. Split out helpers for comparing sequence sizes and sequences from qCompare(QList) and add a template for an array with a non-type template parameter for the size. One can then write something like: const int expected[] = {10, 12,...}; QCOMPARE(QFontDatabase.pointSizes(...), expected) Unfortunately, any commas in such an array will be misread by macro expansion as macro argument separators, so any expected array with more than one entry needs an extra macro expanding __VA_ARGS__. Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Ensure styles always get to polish the application paletteTor Arne Vestbø2020-07-212-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 0a93db4d82c051164923a10e4382b12de9049b45 we would polish the application palette even when it was the default palette, as we always recreated the system palette each time a style was set. After the change we skipped polishing the palette unless it was set by the user, under the assumption that the style would set its own default palette if it wanted to override the system palette. This turned out to break the style's ability to slightly tweak the palette via polish (versus the more full on standardPalette approach). We now polish both the default palette and user palettes, and we do so as part of the normal palette update logic. This ensures that the style also gets a chance to polish the palette when the platform theme changes. The polish will not have an effect on the resolve mask of the palette, as the polish is conceptually the same as a base palette, and should not affect e.g. Qt::AA_SetPalette. Fixes: QTBUG-85469 Fixes: QTBUG-85188 Pick-to: 5.15 Change-Id: I869e9c442b177de4f1dc49eb75220709306f4d12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change QWindow/QWidget::map(To/From)(Global/Parent) to operate in floatFriedemann Kleint2020-07-141-0/+4
| | | | | | | | | | | | | | | Change the functions to operate in float and add the QPoint versions as overload calling them. This is more in-line with the event accessors using float and allows for removing some workarounds using a delta when converting touch points. Leave QPlatformWindow::map(To/From)Global() as is for now and add helpers for float. Change-Id: I2d46b8dbda8adff26539e358074b55073dc80b6f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QVariant::setValue(): enable move semanticsGiuseppe D'Angelo2020-07-131-4/+4
| | | | | | | | | | | | Given we optimize for the case where the new value is of the same type of the one already stored in the variant, enable move assignment for that case. As a drive-by, avoid a path to detach() for data() if we know we're detached. Change-Id: I9abbdc10637ce77ebb747b49d83e1ef914d997bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor pointer event hierarchyShawn Rutledge2020-07-104-97/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some goals that have hopefully been achieved are: - make QPointerEvent and QEventPoint resemble their Qt Quick counterparts to such an extent that we can remove those wrappers and go back to delivering the original events in Qt Quick - make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl - remove most public setters - reduce the usage of complex constructors that take many arguments - don't repeat ourselves: move accessors and storage upwards rather than having redundant ones in subclasses - standardize the set of accessors in QPointerEvent - maintain source compatibility as much as possible: do not require modifying event-handling code in any QWidget subclass To avoid public setters we now introduce a few QMutable* subclasses. This is a bit like the Builder pattern except that it doesn't involve constructing a separate disposable object: the main event type can be cast to the mutable type at any time to enable modifications, iff the code is linked with gui-private. Therefore event classes can have less-"complete" constructors, because internal Qt code can use setters the same way it could use the ones in QTouchEvent before; and the event classes don't need many friends. Even some read-accessors can be kept private unless we are sure we want to expose them. Task-number: QTBUG-46266 Fixes: QTBUG-72173 Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Tests: Use QVERIFY instead of QCOMPARE for empty listsFriedemann Kleint2020-07-101-4/+4
| | | | | | Pick-to: 5.15 Change-Id: I4da02fa11583eca3844bf42efcdf818b8bbd6a94 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt::Modifier: do some cleanupsGiuseppe D'Angelo2020-07-091-5/+5
| | | | | | | | | | | | | | | | | | Qt::UNICODE_ACCEL had no effect since at least Qt 4.0. We can drop it in Qt 6. The whole Qt::Modifier enumeration is still widely used, so we can't drop it yet, but we should aim at doing so in Qt 7. Add a note. [ChangeLog][QtCore][Qt::Modifier] The Qt::UNICODE_ACCEL enumerator has been removed. It had no effect since Qt 4.0. [ChangeLog][QtCore][Qt::Modifier] Usage of the enumerators in the Qt::Modifier enumeration is discouraged. The enumeration will likely get removed in the next major version of Qt. Change-Id: If25f30d920878d32903b91a38044f5da042c7eab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate subdir test projectsAlexandru Croitor2020-07-094-10/+13
| | | | | | | | And generate a few more test projects that were missing. Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-09125-152/+152
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-076-16/+16
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in other qtbase testsJarek Kobus2020-07-071-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use qsizetype in QListLars Knoll2020-07-063-15/+15
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid use of Q_UNUSED by eliminating the parameter namesLars Schmertmann2020-07-031-4/+3
| | | | | | | | | This change only happens to files touched by the commit to add missing ; to Q_UNUSED. Task-number: QTBUG-82978 Change-Id: I10e6993a2bb3952cf9a262708b8573550e0dbe63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTabBar: make sure the tab is repainted after releasing mouseWang Chuan2020-07-021-0/+38
| | | | | | | | | | | | | | The tab has to be repainted even f the mouse release event happened outside the tab bar, otherwise it will look like the tab is still pressed. As a drive-by, replace the repaint() call with update(); there is no need for synchronous painting in an event handler. Pick-to: 5.15 Fixes: QTBUG-81637 Change-Id: Ia55182be906511ac3b462f00add8a621c6c05fc3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix delivery of MouseMove events to newly opened popup windowsVolker Hilsheimer2020-07-011-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | Amend d934fd7f54eae24ea3f719890e2c4dbbc445049d, which was too naive in assuming that any change to the popup stack while a popup had been pressed into should result in mouse move events to be delivered without buttons. Instead, add a new flag that is set explicitly when the qt_popup_down widget is closed, and remove buttons from the move move events only when that flag is set. Add the sorely missing test case as well, even if we have to accept that not all behavior can be tested reliably. Ie. on macOS, the simulated mouse event differs from the event we do get from the QPA plugin or the system; on Xcb, some of the behavior depends on the window manager. This is something we could try to clean up for Qt 6. Change-Id: Ibf0a0a6fb7d401915057365788947e5a35aa20c3 Fixes: QTBUG-84926 Task-number: QTBUG-82538 Pick-to: 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-262-11/+1
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in widgets testsJarek Kobus2020-06-2528-287/+270
| | | | | | Task-number: QTBUG-84469 Change-Id: I490fdb237afad2d8a15954fe34d6b549a83fa4aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>