summaryrefslogtreecommitdiffstats
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-0756-69/+69
| | | | | | | | | 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-074-6/+6
| | | | | | | | | | | | 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>
* Fix rhi manual test buildLaszlo Agocs2020-09-301-0/+1
| | | | | Change-Id: Ib121a3a9871c29c10c1f3ae720c093444e076e8c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qtabletevent/regular_widget manual test: Add a toggle for WinTabFriedemann Kleint2020-09-273-12/+56
| | | | | | Task-number: QTBUG-83218 Change-Id: I179f53c051c92dbb86fbac710d4a514c4e5d3c49 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilation of some manual testsFriedemann Kleint2020-09-2613-28/+29
| | | | | | | | | - qtabletevent/device_information - dialogs - windowflags Change-Id: Id3e4b2aec2a873b00dcda39fb1227b24832181ca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* rhi: vulkan: Fix mipmap generation for cubemapsLaszlo Agocs2020-09-251-1/+4
| | | | | Change-Id: Ia1aab06214be802aaabc97ffefa28947e11148e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-23134-175/+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-226-1/+5
| | | | | | | | | 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>
* Say hello to PixelGadgetMorten Johan Sørvig2020-09-183-0/+445
| | | | | | | | | | | | Utility for visualizing and debugging high-dpi rendering using QPainter, at different (fractional) scale factors. In addition contains prototype code for mitigating painting artifacts such as drawing outside the clip rect when scaling. Change-Id: I44f39315ad9674790d51413dddf41e3a51043da6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Say hello to DprGadgetMorten Johan Sørvig2020-09-183-0/+209
| | | | | | | | | | DprGadget displays the devicePixelRatio for the current screen using a large friendly font, as well as the platform and environment inputs used for determining the DPR. Change-Id: Id619edad181eb7717f18eb98af341d6582a843a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: Expose compute threadgroup limits in ResourceLimitsLaszlo Agocs2020-09-181-0/+5
| | | | | | | | | | As OpenGL ES and Vulkan ruin the day with the spec mandated minimum value for max threads per threadgroup being only 128, clients need a way to decide if their compute shader (local_size_*) is suitable for use at run time. Change-Id: I72b4fc97032406340623add82ea4d9544ebe9fdc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Switch QSurfaceFormat::colorSpace to a QColorSpaceAllan Sandfeld Jensen2020-09-151-1/+1
| | | | | | | Allows more flexibility in the future. Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNAM: Enable HTTP/2 by defaultMårten Nordheim2020-09-101-1/+0
| | | | | | | | | | | | | | | It has been in Qt for some years now and 6.0 marks a good point to enable it by default. The exception is connectToHostEncrypted where we still require the users to enable it explicitly since there's no logical way to disable it. [ChangeLog][QtNetwork][QNetworkAccessManager] HTTP/2 is now enabled by default. Fixes: QTBUG-85902 Change-Id: Ia029a045727cc593d77df9eb3a5888522ad19199 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-104-5/+5
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deliver Quit event when calling QCoreApplication::quit()Tor Arne Vestbø2020-09-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change QWidget::enterEvent signature to take a QEnterEventVolker Hilsheimer2020-09-051-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* xcb: drop Xinerama supportLiang Qi2020-09-041-2/+1
| | | | | | | | | | [ChangeLog][Important Behavior Changes][X11] Xinerama is no longer supported. Fixes: QTBUG-86082 Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Remove deprecated QPrinter and QPagedPaintDevice APIsVolker Hilsheimer2020-09-041-137/+2
| | | | | | | | | | | Adjusting the QPrinter test case - some use cases no longer exist, or are already tested in QPageSize and QPageLayout tests. Adjust examples and manual tests. Change-Id: I01cbc65f3d8031aea2dac86dd942126ba708b111 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Deprecate and remove uses of AA_DisableHighDpiScalingTor Arne Vestbø2020-08-314-24/+1
| | | | | | Change-Id: Ibadce68775858c524b998aacad310905ba2c2e8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Deprecate and remove all uses of AA_UseHighDpiPixmapsTor Arne Vestbø2020-08-313-39/+0
| | | | | | | High-DPI pixmaps are always enabled, and cannot be disabled. Change-Id: I01a006b404e5431582b64ef812974c1c022b39ae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: Work around qsizetype fallout in manual testsLaszlo Agocs2020-08-302-2/+2
| | | | | Change-Id: I9f0e210caacc6eefe5ed1ee6fa97574ad5e9edcc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* High-DPI: Remove usage of Qt::AA_EnableHighDpiScalingTor Arne Vestbø2020-08-287-14/+1
| | | | | | | | 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>
* Remove QMacNativeWidget and QMacCocoaViewContainerTor Arne Vestbø2020-08-285-269/+0
| | | | | | | | | | | | The functionality should be available via QWidget::winId(), and QWidget::createWindowContainer() + QWindow::fromWinId(). Any bugs in this area should be fixed by improving the general wrapping APIs. Fixes: QTBUG-83254 Change-Id: I86584a4a8138d17d65a50da39efd58039f10da91 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Rename confusingly named QFont/QPalette::resolve overloadsVolker Hilsheimer2020-08-251-1/+1
| | | | | | | | | | | | | | | 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>
* rhi: Enable msaatexture manual test on OpenGLLaszlo Agocs2020-08-176-1/+1
| | | | | | | | | | | | | ...now that a recent path enables MultisampleTextures for ES >= 3.1 and GL 3.x and up. Just need to make sure the .qsb contains something for OpenGL as well. While we are at it, make updated .qsb files for all the commonly used shaders since what we had before was version 4. Bump them to version 5. Change-Id: If2040f4894e6360d1ebd5daf7e698508e5e6e42e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Introduce QWidget::setScreenVolker Hilsheimer2020-08-175-1/+179
| | | | | | | | | | | | | | | | | | 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>
* 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>
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-043-4/+8
| | | | | | Task-number: QTBUG-84220 Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Clean up manual network stress-testEdward Welbourne2020-07-271-10/+17
| | | | | | | | | | | | | | | Don't attempt the remote test if we don't have a remote server. Don't add error returns from read to byteCounter. Don't cast from ASCII to QString in URL components. Don't waste time encoding a path for which it's a no-op (especially as I recently deleted the method used to do it). Name the time-out, both for clarity and to give anyone who needs to debug the test only one line to edit so as to increase the time-out enough to make debugging practical. Change-Id: I378aa96c0501f7033ca4abb82734b03b8c807f08 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix some compiler errors caused by bit-rot in manual testsEdward Welbourne2020-07-2712-137/+39
| | | | | | | | | | | Two methods that have gone away or been renamed, an enum that now doesn't support being assigned from int. QTime should no longer be used as a timer. Removed a test of deprecated code that's gone away. Task-number: QTBUG-85700 Change-Id: Idc6d59542625d22b9937084411b54b0d8aa87f00 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLogging: purge deprecated qInstallMsgHandler(QtMsgHandler)Edward Welbourne2020-07-232-25/+2
| | | | | | | | Deprecated since 5.0. Renamed a function in a manual test that no longer needs to say it's Qt5-specific. Change-Id: I6f2159c702f389d378a0e4d86bd4fe633298b100 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Manual touch test: Add a settings dialog for windowsFriedemann Kleint2020-07-222-1/+86
| | | | | | | | | | Exercise the touch settings of the native interface. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I5ae95a79c00b55236dbbed9d8549f4fdf5b10b8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix the touch manual test to compileFriedemann Kleint2020-07-221-3/+2
| | | | | | Task-number: QTBUG-72167 Change-Id: I9074fc21ae8fccf66140fb38bfbd35e526506c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Styles manual test: show active, inactive and disabled palette colorsShawn Rutledge2020-07-171-13/+15
| | | | | Change-Id: I19c9648f3099ec299e0117748a2808d7a407a3e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refactor pointer event hierarchyShawn Rutledge2020-07-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Regenerate manual testsAlexandru Croitor2020-07-08140-172/+276
| | | | | Change-Id: Id42b9e481375d2ec0e68b73dc1e2ff36f0cbd49e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-075-8/+8
| | | | | | | | 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-0733-104/+105
| | | | | | Task-number: QTBUG-84469 Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Introduce platform API abstraction for QOpenGLContextTor Arne Vestbø2020-07-023-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is available by including qopenglcontext.h as usual, but scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QCocoaGLContext::fromNative(nsContext, shareContext); b) Access to underlying native handles, e.g. openGLContext->platformInterface<QCocoaGLContext>->nativeContext() c) Platform specific functionality, e.g. static QWGLContext::openGLModuleHandle() openGLContext->platformInterface<QEGLContext>->doSomething(); The platform interfaces live close to the classes they extend, removing the need for complex indirection and plumbing, and avoids kitchen-sink modules and APIs such as the extras modules, QPlatformFunctions, or QPlatformNativeInterface. In the case of QOpenGLContext these platform APIs are backed by the platform plugin, so dynamic_cast is used to ensure the platform plugin supports the requested interface, but this is and implementation detail. The interface APIs are agnostic to where the implementation lives, while still being available to the user as part of the APIs they extend/augment. The documentation will be restored when the dust settles. Task-number: QTBUG-80233 Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-261-2/+1
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix qsizetype fallout in rhi manual testsLaszlo Agocs2020-06-261-2/+2
| | | | | Change-Id: I574a2930b5eeb4b3e1f3c6fca6d70dbda64ec324 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Update QTabletEvent device_information manual testShawn Rutledge2020-06-172-30/+20
| | | | | | | | | | | | | | | - stop using deprecated accessors in QTabletEvent and QMouseEvent - position() and globalPosition() provide high resolution so we don't need to display hi-res global pos separately - keep a pointer to the last-seen QPointingDevice instance rather than copying fields out of it; it will only be deleted if the platform plugin does that (usually only at exit or when it's unplugged) - show seat ID - show platform-specific device ID Change-Id: Ic34e1d1256d6956867992db831c2e66bdda7001e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-165-66/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* rhi manual tests: Prevent warnings with MSVCLaszlo Agocs2020-06-159-15/+15
| | | | | | | | | | | | The QPair changes trigger warnings about size_t vs. quint32. We made offsets and sizes 32-bit in the QRhi API to emphasize that some of the graphics APIs are using 32-bit sizes still. It's a bit unfortunate that pairs now generate warnings when the size does not match. Just cast as needed. Change-Id: I88504eed8be6f4bdb2205b3671e2c2a9db9fcb1e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-089-254/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove winrtOliver Wolff2020-06-063-5/+5
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix compilation of lance toolEskil Abrahamsen Blomfeldt2020-06-051-1/+1
| | | | | | | | | The QLayout::setMargin(x) call has been deprecated since Qt 5.13. It was an alias for setContentsMargins(x, x, x, x) so we just replace it with that. Change-Id: I1c89eebfe776e0e3c8d0bdc19244bd452db4ef3c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* rhi: Harmonize create-destroy API pattern with the rest of QtLaszlo Agocs2020-05-2825-199/+199
| | | | | | | | | | For historical reasons we use build and release instead of create and destroy. This becomes confusing now that more modules in Qt start taking QRhi into use. Migrate to the more familiar naming, so those who have used QWindow or QOpenGLContext before will find it natural. Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* RHI: Store texture handle as 64-bit intEskil Abrahamsen Blomfeldt2020-05-221-1/+1
| | | | | | | | | | | | | | | | | | When storing a void* pointer to the texture handle, we had to ensure that the variable would exist until the build phase, which is error prone and caused errors in QQuickWidget because we copied the texture ID from the FBO into a local variable before passing it into QQuickWindow::setRenderTarget(). The reason for using a void* was that we cannot know the width of the handles in the different backends, but we do know that they are 64-bit at maximum, so instead of storing potentially dangling pointers, we just make it a 64-bit integer and cast it back and forth in the backends. Task-number: QTBUG-78638 Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove QScreen::orientationUpdateMaskShawn Rutledge2020-05-071-2/+1
| | | | | | | | | | | | | | | | | | It simplifies the API and reduces surprise to have rotation working by default. On Android, the manifest specifies which orientations the application has been designed to support; on iOS, it is controlled via the UISupportedInterfaceOrientations property list key. In addition, QWindow::contentOrientation() is another way to give a hint to the window manager, or on iOS to directly control whether the window's rotation is locked or not. Task-number: QTBUG-35427 Task-number: QTBUG-38576 Task-number: QTBUG-44569 Task-number: QTBUG-51012 Task-number: QTBUG-83055 Change-Id: Ieed818497f686399db23813269af322bfdd237af Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>