summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
Commit message (Collapse)AuthorAgeFilesLines
* Update tst_qguivariant to use QMetaTypeDavid Skoland2020-10-281-2/+2
| | | | | Change-Id: I4c789ecfc9f4613bd4820a8a6530249c51344a83 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-232-3/+3
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename the QMetaType::MovableType flag to RelocatableTypeLars Knoll2020-10-231-1/+1
| | | | | | | Keep this in sync with the changes we have done in QTypeInfo. Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QPointer comparisons hidden friendsAllan Sandfeld Jensen2020-10-231-3/+3
| | | | | | | Reduces ADL noise. Change-Id: Id0aa4b32b7bb6d70ed9106b949452d895d9060a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QEvent::setAccepted() virtual; set QEventPoints state the sameShawn Rutledge2020-10-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick, when we deliver an item-specific QTouchEvent that contains only the subset of eventpoints that are inside the Item's bounds, traditionally the Item can accept the event to tell the delivery logic that the event is handled and doesn't need to be delivered further. But an Item cannot be expected to have total scene awareness; so now, the delivery is "done" only when all eventpoints in the original event are accepted. This behavior has been working well enough already due to logic in QQuickWindow that iterates the points and accepts them if the event is accepted; but it seems appropriate to move this enforcement into QPointerEvent itself. Making setAccepted() virtual gives us a useful degree of freedom. Event-handling code should alternatively use QEventPoint:setAccepted() or QPointerEvent::setExclusiveGrabber() to take resonsibility for only a subset of the touchpoints. Another way to put it is that we treat QPointerEvent::setAccepted() as a convenience method: accepting the QEventPoints is what counts (at least in Qt Quick). Change-Id: Icec42dc980f407bb5116f5c0852c051a4521105a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a bunch of compiler warnings in event handling test casesVolker Hilsheimer2020-10-221-9/+12
| | | | | | | | Leave the normalizedPos warnings, there is no equivalent function. Change-Id: I50c72ab24b4855e36941aafdee30cdb0e94c1684 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* [Android] Make sure expose events are emitted after window resizePiotr Mikolajczyk2020-10-211-3/+0
| | | | | | | | | | | | Expose event would not be sent when window was resized Fixes: QTBUG-69155 Pick-to: 5.15 Change-Id: I81bf2d54f830a0dabf15398e1f25b55ff7ff4479 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* QEvent copy constructor: copy the type flags tooShawn Rutledge2020-10-211-0/+9
| | | | | | | | | | | | | Failure to copy m_inputEvent and m_pointerEvent actually left them uninitialized, and resulted in random behavior in Qt Quick when Flickable clones a pointer event for later replay. Remove the comment about copying events being a "bad idea" in Qt 4, while we're at it. Copying became more common in Qt 5, and we probably won't be able to stop doing it now. Change-Id: I40b6ba5ad696e7aaafbeefbca86eca00cab40616 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge existing tst_qhighdpiscaling into tst_qhgihdpiMorten Johan Sørvig2020-10-205-105/+23
| | | | | | | | | Move the factor() test, drop scale() which should be covered already. Change-Id: Id2079536a91c7e9f7199960bdf6b33489d0a6670 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add high-dpi auto testMorten Johan Sørvig2020-10-205-0/+455
| | | | | | | | | | | | | | | | | | Use the new screen config feature of the offscreen platform plugin to run tests on virtual screen setup. This has the benefit that we can auto-test the QHighDpiScaling implementation (as well as its usage in QtGui) on any platform with a fixed mock screen setup which does not rely on physical screen configuration. Test the following configurations: - three screens: 96 DPI. (reference) - three screens: 192 DPI - three screens: mixed (high) DPI Change-Id: I2fac889d896cf30ab2a79c306cee22177ad8f4ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix compile warnings from ignored return valueVolker Hilsheimer2020-10-171-2/+2
| | | | | | | | The return value can be ignored here, so make intention clear. Change-Id: I116869c47039b159db96f133b5850a2215873c2f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Test QImage move semanticsAllan Sandfeld Jensen2020-10-161-2/+33
| | | | | | | Tests the move semantics of QImage in Qt6. Change-Id: Ia4d95f0b88ca7dde0daf85a0f53049b42b5be1a5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fallback to using the family when doing an exact matchAndy Shaw2020-10-121-0/+15
| | | | | | | | | | If the difference between the families sizes is just 1 where one of them is 0 in size then we can fallback to the family in that case. Pick-to: 5.15 Fixes: QTBUG-87267 Change-Id: I62b25b06c88000b4d7defe91871c07873b1fc792 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* rhi: Make the new direct buffer update available for non-uniform buffersLaszlo Agocs2020-10-121-0/+216
| | | | | | | | | | | | | | | | | The original restriction to UniformBuffer was due to the GL backend where there is no GL buffer object for QRhiBuffers with usage UniformBuffer. However, we can still implement this for cases when there is a true GL buffer object underneath. With other backends it should all work as-is already. This becomes useful when one has buffers with usage Vertex that need full updates every frame. (f.ex. instance data) Unfortunately this involves renaming the function. But while at it, add an autotest case as well. Change-Id: Iff59e4509a8bae06654cc92fe8428bd79eb012fb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-076-14/+14
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rename the new platform APIs from QPlatformInterface to QNativeInterfaceTor Arne Vestbø2020-10-072-5/+5
| | | | | | | | | | | | We were already using the 'native' nomenclature when referring to these kinds of APIs, e.g. when talking about native handles, or the existing QPlatformNativeInterface on a QPA level. Using 'native' for the user facing APIs also distinguishes them from the 'platform' backend layer in QPA and elsewhere. Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* End touch->mouse synthesis when the chosen touchpoint is releasedShawn Rutledge2020-10-021-0/+24
| | | | | | | | | | | | | | | | During delivery of a TouchBegin event, if no widget accepts it, we begin treating the first touchpoint as a synth-mouse, as before. If a second touchpoint is pressed or released in any order, it's irrelevant: the fake mouse button is released as soon as the first touchpoint is released. This fixes the bug that such a scenario caused the mouse release not to be sent, so that a widget could get "stuck" in pressed state. Done-with: Tang Haixiang <tanghaixiang@uniontech.com> Fixes: QTBUG-86253 Pick-to: 5.15 Change-Id: I7fbbe120539d8ded8ef5e7cf712a27bd69391e02 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: vk: Alter command buffer strategyLaszlo Agocs2020-10-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reports on the Web have it that there's nothing guaranteeing a driver does any actual freeing of resources then doing vkFreeCommandBuffer for a command buffer from a command pool that does not have VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, thus leading to continuously growing resource usage with our current allocate/free pattern. It could be that this is the source of out of memory problems we are seeing on some Android devices. Instead of just going straight for said command pool flag and doing ResetCommandBuffer for the command buffers individually, take one step further and use per-slot (slot being 0 or 1 if QVK_FRAMES_IN_FLIGHT is 2) command pools. The current pool is reset in each beginFrame/beginOffscreenFrame, moving all allocated command buffers to the initial state (while other command buffers with the other pool are not affected). This may be (while impossible to tell from just guessing based on the spec) our best approach to command buffer allocation since a Vulkan implementation can likely just use some simple per pool allocator, knowing that we never want to free or reset individual command buffers, but we rather only reset the whole pool at once. The option of importing an existing VkCommandPool when creating the QRhi instance is now gone, but there was probably no point in offering that in the first place. When it comes to VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT it will not be set unless releaseCachedResources() (in Qt Quick this is hooked into QQuickWindow::releaseResources()) was called. What this does in practice is unknown, but have an option to set it now and then if the application really wants. While we are at it, rename secondaryCbs to activeSecondaryCbStack to indicate what it really is. (it's a stack as each call to beginExternal() pushes a new one, while each endExternal() pops) Change-Id: I2e5c1fad26d794e1f56c778e38f750998d706d84 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Make per-frame flags per-pass where appropriateLaszlo Agocs2020-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | ExternalContentsInPass becomes a per-pass flag now. Why is this beneficial? Because while Qt Quick has no choice for its render pass, not being able to guess if the application wants to do some native rendering in there, Quick 3D's render passes, all the ones that are under Quick3D's control, do not have native rendering from the application in them, and so using secondary command buffers with Vulkan is not necessary. Introduce something similar for compute and OpenGL. By knowing that none of the resources used in a pass are used with a compute pass (e.g. because we know that there are no compute passes at all) a small amount of time can be saved by skipping tracking buffers and textures because the only purpose of said tracking is to generate barriers that are relevant only to compute. Change-Id: I0eceb4774d87803c73a39db527f5707a9f4d75c1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tst_qwindow: verify isBeginEvent(), isUpdateEvent() and isEndEvent()Shawn Rutledge2020-09-301-8/+25
| | | | | | | | | | | | | | | | | | It also demonstrated that the tests were out of sync with reality: since a97759a336c597327cb82eebc9f45c793aec32c9 QMouseEvent::button() and QWindowSystemInterfacePrivate::MouseEvent::button should be the button that changes state of course; but when a button is pressed, we are reacting to it after the fact, so QMouseEvent::buttons() and QWindowSystemInterfacePrivate::MouseEvent::buttons should include the new button that was just pressed. Likewise when a button was released, we send the event with buttons _omitting_ the button that was just released. Amends 147a8bc4c86dd7c818acd2614ee67cd7098cfa5e and 6d6ed64d6ca27c1b5fec305e6ed9b923b5bb1037 Change-Id: I670289019fcfa7de685ca38799804772dc0f1c8f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add logging categories to image handlersAllan Sandfeld Jensen2020-09-301-4/+4
| | | | | Change-Id: Ia0c47826d08b3f641c17d8a585f62d008a8b095b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Revert "Blacklist tst_QWindow::exposeEventOnShrink_QTBUG54040"Liang Qi2020-09-301-1/+0
| | | | | | | | | | | | This reverts commit b1ef104866f78ae5bbc1214ae524bad4120ef0e2. This test is BPASS on openSUSE_42_3 for 5.12 and PASS on openSUSE_15_1 for 5.15. Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ia1d81ed38491c27c01f270623c5082663f4da699 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* rhi: Drop QBitArray usageLaszlo Agocs2020-09-291-0/+13
| | | | | Change-Id: I4ae92e6c8c91111a4593c51ee05443b3bc806c35 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix compiler warnings from QKeyCombinationLars Knoll2020-09-282-35/+35
| | | | | | | | Change lots of code to avoid the deprecated operator+() or implicit casts to int. Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Preserve formats in QImage::scaled()Allan Sandfeld Jensen2020-09-261-0/+30
| | | | | | | | | Do not always use the smoothScaled routine, the normal routines are also optimized, and do not convert to alpha formats when not necessary. Task-number: QTBUG-49719 Change-Id: I6ee9b620cc259472c419e7363357f41ce29b594a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Give QPixmap a move constructorVolker Hilsheimer2020-09-231-0/+15
| | | | | | | | | | | | It already has a move-assignment operator, and implements swapping. This requires a specialization of the QExplicitlySharedDataPointer destructor to be forward declared, and an implementation that is identical to the default version. Otherwise we would need QPlatformPixmap to be fully defined in the public QPixmap header. Change-Id: I2651bbc29a7083a93e3b3ad671d3aeea659b7d5a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix Qt6 todo in qcssparserAllan Sandfeld Jensen2020-09-231-3/+2
| | | | | | | | Colors with wrong number of elements are now invalid. Change-Id: I32c934894de86095d9790baa5f0d2001d76bcd3c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* rhi: d3d: Fix dynamic offsets with multiple buffersLaszlo Agocs2020-09-2313-0/+209
| | | | | | Fixes: QTBUG-86821 Change-Id: I57f86bf0f7e95b92f5b2c5fee587112ecf0fc8e6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-23121-188/+175
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate projectsAlexandru Croitor2020-09-221-1/+1
| | | | | | | | | Clean up the state of the projects, before changing the internal CMake API function names. Task-number: QTBUG-86815 Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix failing tests on macOS developer buildsAlexandru Croitor2020-09-222-0/+14
| | | | | | | | | | | | | | | | | | tst_qguiapplication was missing an Info.plist file. We can't directly reference the tst_qcoreapplication Info.plist file like the qmake project does, because that breaks ninja (says multiple rules create the same output file), so use a copy instead. Blacklist the qpluginloader loadMachO test when doing CMake builds. The qmake projects use multiple custom rules to build the macho plugins, which need to be ported to CMake. Task-number: QTBUG-86053 Task-number: QTBUG-86792 Change-Id: Iaff2b2d5e9e84a457b4f2ffc011a580388498f00 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Define inverted QRects consistentlyAllan Sandfeld Jensen2020-09-211-1/+1
| | | | | | | | | | | | | | | | Changes the definition of invalid QRects to be more consistent. This simplifies the logic, and makes it possible for us to fix normalized() so dimensions don't change. The actual API is not changed except for inverted rects. Only one use-case for the old normalized() function existed, and has been reimplemented as QRect::span(). Fixes: QTBUG-22934 Change-Id: I29dad2952dc6c8e84a6d931898dc7e43d66780f3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup API of QMimeDataLars Knoll2020-09-211-1/+1
| | | | | | | | | | | | | Do not use QVariant::Type anymore, instead use QMetaType For some reason, this pushed the qvariant autotest over the limit where MSVC requires the /bigobj flag, so add that one. [ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData() function has changed and now takes a QMetaType instead of a QVariant::Type. Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rename is[Begin|Update|End]Event, reimplement in QWheelEventShawn Rutledge2020-09-172-14/+14
| | | | | | | | | | | | | | These states correspond well with ScrollPhase, and this abstraction makes it possible to handle wheel events the same way as mouse events in Qt Quick: on "begin" we deliver to all Items and Handlers until all points (the only point) are accepted; on "update" and "end" we deliver only to the exclusive grabber, if there is one, and to any passive grabbers. Change-Id: I702dbd4f2c1bf5962eb3dbb9e4b725300a00a887 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate implicit QPixmap conversion to QBitmapVolker Hilsheimer2020-09-171-1/+1
| | | | | | | | | | | | | | | | It is lossy, so should be requested explicitly, using a dedicated fromPixmap factory function. Deprecate the constructor and assignment operator, and make the constructor explicit. [ChangeLog][QtGui][QBitmap] Implicitly constructing and assigning to a QBitmap from a QPixmap has been deprecated, and the respective constructor has been made explicit. Use the fromPixmap factory function instead. Change-Id: I68ce85b26c901415137b664a1db687021d48bae0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix deprecation warnings in testsVolker Hilsheimer2020-09-171-1/+1
| | | | | | | | Adjust to changes to QIcon::pixmap, QMetaType::type, and QAbstractItemView::itemDelegate. Change-Id: I9eb0331ef899131afc86c33f27feeee76331ffc8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Mouse->touch synthesis: send touch event with mouse deviceShawn Rutledge2020-09-161-1/+19
| | | | | | | | | | | In 4e400369c08db251cd489fec1229398c224d02b4 we began to send synth-mouse events from the touch device, but in the opposite direction it was not consistent. Add autotests to prove that it's consistent both ways now. Change-Id: I7df2328fef224dc1529ca5d27411cd8a5a9c8df9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Calculate velocity in QMutEventPoint::setTimestamp() with Kalman filterShawn Rutledge2020-09-162-1/+101
| | | | | | | | | | | | | | This functionality was only in Qt Quick in Qt 5. Now we move it up to QtGui so that every QEventPoint will have a valid velocity() before being delivered anywhere. [ChangeLog][QtGui][QPointerEvent] Every QEventPoint should now carry a valid velocity(): if the operating system doesn't provide it, Qt will calculate it, using a simple Kalman filter to provide a weighted average over time. Fixes: QTBUG-33891 Change-Id: I40352f717f0ad6edd87cf71ef55e955a591eeea1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Track grab state in QPointingDevicePrivate::activePointsShawn Rutledge2020-09-164-37/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickEventPoint instances were very long-lived and got reused from one event to the next. That was initially done because they were "heavy" QObjects; but it also became useful to store state in them between events. But this is in conflict with the ubiquitous event replay code that assumes it's OK to hold an event instance (especially a QMouseEvent) for any length of time, and then send it to some widget, item or window. Clearly QEventPoints must be stored in the QPointerEvent, if we are to avoid the need for workarounds to keep such old code working. And now they have d-pointers, so copying is cheap. But replay code will need to detach() their QEventPoints now. QEventPoint is useful as an object to hold state, but we now store the truly persistent state separately in an EventPointData struct, in QPointingDevicePrivate::activePoints. Incoming events merely update the persistent points, then we deliver those instead. Thus when event handler code modifies state, it will be remembered even when the delivery is done and the QPA event is destroyed. This gets us a step closer to supporting multiple simultaneous mice. Within pointer events, the points are moved up to QPointerEvent itself: QList<QEventPoint> m_points; This means pointCount(), point(int i) and points() can be non-virtual. However in any QSinglePointEvent, the list only contains one point. We hope that pessimization is worthwhile for the sake of removing virtual functions, simplifying code in event classes themselves, and enabling the use of the range-for loop over points() with any kind of QPointerEvent, not just QTouchEvent. points() is a nicer API for the sake of range-for looping; but point() is more suited to being non-const. In QML it's expected to be OK to emit a signal with a QPointerEvent by value: that will involve copying the event. But QEventPoint instances are explicitly shared, so calling setAccepted() modifies the instance in activePoints (EventPointData.eventPoint.d->accept); and the grabbers are stored separately and thus preserved between events. In code such as MouseArea { onPressed: mouse.accepted = false } we can either continue to emit the QQuickMouseEvent wrapper or perhaps QEvent::setAccepted() could become virtual and set the eventpoint's accepted flag instead, so that it will survive after the event copy that QML sees is discarded. The grabChanged() signal is useful to keep QQuickWindow informed when items or handlers change exclusive or passive grabbers. When a release happens at a different location than the last move event, Qt synthesizes an additional move. But it would be "boring" if QEventPoint::lastXPosition() accessors in any released eventpoint always returned the same as the current QEventPoint::xPosition()s just because of that; and it would mean that the velocity() must always be zero on release, which would make it hard to use the final velocity to drive an animation. So now we expect the lastPositions to be different than current positions in a released eventpoint. De-inline some functions whose implementations might be subject to change later on. Improve documentation. Since we have an accessor for pressTimestamp(), we might as well add one for timestamp() too. That way users get enough information to calculate instantaneous velocity, since the plan is for velocity() to be somewhat smoothed. Change-Id: I2733d847139a1b1bea33c00275459dcd2a145ffc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tests to build in a no-widgets configurationAlexandru Croitor2020-09-152-5/+8
| | | | | | | | | | | | The qfilesystemmodel.pro was recently moved to the gui tests subfolder, but it uses widgets inside. Skip it in a no-widgets build. Amends fb9ec8ad44decba7b2878370f3711b61614f035a Task-number: QTBUG-86187 Change-Id: I955556ffddad483d4c25602ae126b8c2433091b2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add qHash implementation for QPointMitch Curtis2020-09-151-5/+0
| | | | | | | | | [ChangeLog][QtCore][QPoint] Added qHash() implementation. Change-Id: I65332e7aafab53af40a6e11457b9b457196d584c Fixes: QTBUG-86457 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compiler warnings about missing overridesLars Knoll2020-09-131-1/+1
| | | | | Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-122-2/+2
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace qreal with float in QColorAllan Sandfeld Jensen2020-09-112-79/+79
| | | | | | | | There is no reason to use double precision for colors. We at most have 16 significant bits anyway. Change-Id: I8b402cd978675b8ba7248176976d934363212ff1 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-1126-124/+130
| | | | | | | | | | | | 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-101-1/+1
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cleanup QAction::visible propertyAllan Sandfeld Jensen2020-09-101-0/+3
| | | | | | | | Gives it its own changed signal, and simplifies setting from group, while fixing an inconsistency in propagation. Change-Id: I22b243210260a8878144fa4b60204df46f847f37 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Give QEventPoint a d-pointer after allShawn Rutledge2020-09-101-0/+2
| | | | | | | | | | I still have doubts that QEventPoint can't be made small enough that copying would be cheaper than reference-counting and all the indirections in now-noninline accessors, but this gives us the usual freedom to change the data members later on. Change-Id: I792f7fc85ac3a9538589da9d7618b647edf0e70c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Create consistent sets of QImage methodsAllan Sandfeld Jensen2020-09-091-7/+7
| | | | | | | Adds consistently named inplace and imperative methods. Change-Id: I8739c1c4585d2ba4aa181bb9a681255d76c120d7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Refactor testlib touch functions into qtestsupport_gui and _widgetsShawn Rutledge2020-09-081-5/+5
| | | | | | | | | | | | | 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>