summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *)Morten Johan Sørvig2019-08-111-0/+2
| | | | | | | | | Commit b6ded193 added an unconditional dereference of the platformScreen pointer, for calls where nativePostion is non-nullptr. Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* eglfs: Fix raster windowsLaszlo Agocs2019-08-074-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Also sanitize the initial WebAssembly hack. Both eglfs and wasm lack the concept of true raster windows. A QWindow with RasterSurface is rendered with OpenGL no matter what. The two platforms took two different approaches to work around the rest of the machinery: - wasm disabled the QOpenGLContext warning for non-OpenGL QWindows, - eglfs forced the QWindow surfaceType to OpenGLSurface whenever it was originally set to RasterSurface. Now, the latter breaks since c4e9eabc309a275efc222f4127f31ba4677259b7, leaving all raster window applications failing on eglfs, because flush in the backingstore is now checking the surface type and disallows OpenGLSurface windows. (just like how QOpenGLContext disallows RasterSurface windows) To solve all this correctly, introduce a new platform capability, OpenGLOnRasterSurface, and remove the special handling in the platform plugins. Change-Id: I7785dfb1c955577bbdccdc14ebaaac5babdec57c Fixes: QTBUG-77100 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Don't require setting all three color buffer sizes in QSurfaceFormatTor Arne Vestbø2019-08-021-12/+0
| | | | | | Change-Id: Iaa6eb4d64f549a31aa5c53145e8b37facec4ea78 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QHighDPI: Fix broken scaling of QPoint(F)Friedemann Kleint2019-08-011-3/+17
| | | | | | | | | | | | | | For some reason, the overload resolution of the High DPI scale() functions introduced by b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 chose the wrong overloads for QPointF and/or QPoint; it fell back to the generic template intended for qreal, QSize, etc, ignoring the origin. Remove the template and spell out all overloads. Fixes: QTBUG-77255 Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Tie QPlatformOpenGLContext to its QOpenGLContext before initializingTor Arne Vestbø2019-07-171-1/+1
| | | | | | | So that the context can be referenced during initialization. Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix crash with drag cursor handlingJoni Poikelin2019-06-281-5/+9
| | | | | | | | | 7a7c722782a435f7c01b94f48df7a5f4ff4d599e caused a regresssion in some cases. Change-Id: I1089a79534d811b195de663ff664d9ba5a6ac6c5 Fixes: QTBUG-74110 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix crash when setting QGuiApplication palette before app is availableTor Arne Vestbø2019-06-251-1/+4
| | | | | | Change-Id: Ia154f66a27cba970d179f100e66aa2daab01c9fa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHighDpi::fromNativePixels: use correct screenMorten Johan Sørvig2019-06-192-45/+42
| | | | | | | | | | | | | | | | Calls like QHighDpi::fromNativePixels(point, window) would return device independent coordinates outside any screen in cases where the window is spanning multiple screens and the native point was not on the main screen. Correct this by looking up the correct screen and use its scale factor and origin when scaling coordinates. Task-number: QTBUG-73231 Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* High DPI: Fix crash in QWindow::mapFromGlobal()Friedemann Kleint2019-06-191-1/+1
| | | | | | | | | | | With Web Engine, QQuickWidget or similar, the code can hit on the offscreen window, when its handle is null. Add a check. Amends 3af7b279177f7fb092f0e0fb9ffc8e8d846ed774. Fixes: QTBUG-76440 Change-Id: I123633d18386efd3dbfb22aad6072e4f0877a62e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QHighDpi: Replace fromNative()/toNative() with scale()Morten Johan Sørvig2019-05-141-209/+55
| | | | | | | | | | | | | | | | | | | | | | | | | We need one scale() function for each type: the scale factor can be inverted by the caller for the fromNative case. Add a generic templated implementation which will handle simple types. Add add specialization functions for compound types that don't have operator*(), as well as for position types (e.g. QPoint) which account for the origin. There's no need for fromNativePixels() and toNativePixels() overloads for each type; replace with generic implementations which call scale(). Do the same thing for fromNativeLocalPosition(). Some user code is calling fromNative()/toNative() directly, so leave a definition of those functions around for now. Also leave a couple of one-off scaling functions which do not fit the pattern. Also fix “narrowing conversion scaleFactor to int” warning for the QMargins scale function. Change-Id: Ia67accbb670a80dc1747c2e264b97aab75b1251b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* doc: Correct several QEnterEvent accessorsShawn Rutledge2019-06-061-7/+7
| | | | | | | | | | | It's cursor position not widget position, pos() is relative to the widget, and 3 of these accessors return QPointF. Amends e6ddae07e1e571a7a6e0c531b961dbddcd217643. Task-number: QTBUG-36985 Change-Id: Ide437f7496824f8cdd0d03fa38ad7b573e30feaa Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Work around crash where a destroyed window becomes focus_windowMorten Johan Sørvig2019-05-221-0/+6
| | | | | | | | | | Clear QGuiApplication::focus_window (again) in the QWindow destructor. Task-number: QTBUG-75326 Change-Id: Ief00b6adfb267fcc7e3881fd728e12df07fc1094 Reviewed-by: Christian Andersen <csandersen3@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QDataStream: Fix inconsistent results of iostream with QPalette objectsRyan Chu2019-05-201-0/+5
| | | | | | | | | | | | The value of NColorRoles got changed since 5.11. It introduced one more role called "PlaceholderText" in the ColorRole enumeration. When using QDataStream (5.12) to read QPalette objects from a file written by 5.9 (<5.11), the processing results are inconsistent. Fixes: QTBUG-74885 Change-Id: I14d57f9603a26e5890b4fd57c7e464c5b38eb3f2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QHighDpi: Remove fromNativePixels()/toNativePixels() overloadsMorten Johan Sørvig2019-05-221-116/+35
| | | | | | | | | | | | Replace QWindow / QScreen / QPlatformScreen overloads with template functions that take a generic context argument. The API now no longer supports implicit conversions from QPointer<QWindow> to QWindow *, add explicit data() call to usage in qxcbdrag.cpp. Change-Id: I63d7f16f6356873280df58f4e7c924bf0b0eca5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QPA: Prevent QPlatformWindow::initialGeometry() from returning invalid ↵Friedemann Kleint2019-05-221-3/+9
| | | | | | | | | | | | | | | | | geometries When trying to find the screen, the function would always try to determine the screen by checking parents, despite QWindowPrivate::positionAutomatic being false. Determine the screen from the initial geometry when QWindowPrivate::positionAutomatic is false. Bail out when positionAutomatic and resizeAutomatic are false. Fixes: QTBUG-75940 Change-Id: I3cd1b16feab16c89d29856cf3e1bccf2c89280c7 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QHighDpi: Simplify top-level window handling codeMorten Johan Sørvig2019-05-142-40/+29
| | | | | | | | | | | | | Introduce origin(QWindow *), which returns the point around which coordinates should be scaled: the screen origin for top-level windows, and (0, 0) for child windows. The code paths for top-level and child windows can then be combined. Change-Id: I6b9cdbd9e7c2d9406e9137e325c4eb5c79e3ac9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMenu: show shortcuts in context menus by defaultRichard Moe Gustavsen2019-05-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change c2c3452ba introduced a new API in Qt to let QPA inform whether or not shortcuts should be shown in context menus. This was set to false by default, since by observation, this seemed to be the most common behavior across platforms. The problem is that it left no way for the application to override it; The attribute Qt::AA_DontShowShortcutsInContextMenus simply doesn't work when shortcuts are always off. And for some application, showing shortcuts is not just a matter of look-and-feel, but also important information to be able to use the application the way intended. This patch reverts the behavior back to how it was in Qt-5.9, where shortcuts where shown by default (except on macOS where we still keep them off). It's no so much because the "always off" logic is wrong, but because there is no (easy) way/work-around for an app developer to switch them back on (until Qt-5.13, where a new API is introduced to fix the situation: b1a9a77). And this lack of API can be a show-stopper for some when upgrading from e.g 5.9 LTS to 5.12 LTS. This downside of this patch, OTOH, is that it can cause more change that what is normally wanted in a patch release. But out of two evils, this is the best option. Those that wan't to hide shortcuts can set AA_DontShowShortcutsInContextMenus to true, which now will work. [ChangeLog][QtWidgets][QMenu] Shortcuts are again shown by default in context menus, except on macOS. They can be forced off by setting AA_DontShowShortcutsInContextMenus to true. Fixes: QTBUG-69452 Change-Id: Ibcc371395944ac5b19b1d20889940da271bf73d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix QWindow::mapToGlobal()/mapFromGlobal() for multi-screen windowsMorten Johan Sørvig2019-05-134-4/+56
| | | | | | | | | | | | | | | | | | Make these functions handle the case where a window spans multiple screens, and high-DPI scaling is enabled, and the local position (in the window) is not on the window primary screen (as returned by QWindow::screen()). This is done by detecting the case, and then calculating the correct position using the native coordinate system. [ChangeLog][QtGui] QWindow::mapToGlobal()/mapFromGlobal() now handle windows spanning screens correctly. Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Task-number: QTBUG-73231 Change-Id: I3c31b741344d9e85e4f5d9e60bae75acce2db741 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QPlatformTheme::TouchDoubleTapDistance for touch eventsAlexander Volkov2019-05-012-6/+15
| | | | | | | | | | ... and update the cached values on theme change. Modify tst_QWidget::touchEventSynthesizedMouseEvent() to avoid unexpected double click detection. Change-Id: I151c47e851ebba7550b1b09caca2781c28d7d3d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QOffscreenSurface: Suppress setting of a default geometry on the windowFriedemann Kleint2019-04-111-0/+8
| | | | | | | | | | | | | When investigating the bug report, it was discovered that the offscreen window is assigned a default geometry by QPlatformWindow::initialGeometry(), causing subsequent resize events and flushing of event queues. Suppress that by making it a popup which is not subject to window title bar restrictions on Windows and setting the respective flags. Task-number: QTBUG-74176 Change-Id: I7f9c1a3bfd57072c8188a98124bde87491dd25eb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Introduce Q_TRACE_SCOPE to simplify tracing of a function entry/exitMilian Wolff2019-04-051-6/+2
| | | | | | | | | | | Additionally, we also add a Q_TRACE_EXIT which runs a trace point when the scope is exited, leveraging qScopeGuard behind the scenes. Q_TRACE_SCOPE uses Q_TRACE_EXIT internally - the difference is that the _SCOPE version enforces the naming scheme of _entry / _exit for the tracepoints, whereas Q_TRACE_EXIT can be used generically. Change-Id: I4a2f5ea09f451fcf664d07fd493b679f7527ac06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add explanatory comment to QWindowPrivate::resizeAutomaticFriedemann Kleint2019-03-221-0/+4
| | | | | | | | Amends a1c37462eebddf4ad7bc3192f1f3e9a3f7292b19. Task-number: QTBUG-74176 Change-Id: I24fa3e5d88e53e7efb8923fb4c55615a4f90abea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows: Fix tooltip flicker on GL surfacesFriedemann Kleint2019-03-212-3/+8
| | | | | | | | | | | | | | | | QPlatformWindow::initialGeometry() would assign a default height to the initial geometry of the QRollEffectClassWindow since it has height of 0. This causes the obtained geometry to not match and subsequently a geometry change being sent synchronously. Introduce a new flag QWindowPrivate::resizeAutomatic similar to the existing QWindowPrivate::positionAutomatic to prevent assigning a default size and pass through the geometry as is where required. Fixes: QTBUG-74176 Change-Id: I70c66490838a2c4dfe200ec86094d28bd984dd03 Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't quit when last QWindow is destroyed, wait for it to closeTor Arne Vestbø2019-03-191-4/+10
| | | | | | | | | | | Destroying windows happens independently of closing them, e.g. when a window is moved from one screen to another non-sibling screen. The logic for quitting the application should apply to the actual closing of a window, as documented. Change-Id: I2226aff29278aa6fbf054a0994a320eb53196e9e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Move screen maintenance functions from QPlatformIntegration to QWSITor Arne Vestbø2019-03-196-54/+90
| | | | | | | | | | | | | | | QWindowSystemInterface is the de facto API for any plumbing going from the platform plugin to QtGui. Having the functions as protected members of QPlatformIntegration was idiosyncratic, and resulted in awkward workarounds to be able to call the functions from outside of the QPlatformIntegration subclass. The functions in QPlatformIntegration have been left in, but deprecated so that platform plugins outside of qtbase have a chance to move over to the new QWSI API before they are removed. Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* macOS: Add IOSurface based backingstore for layer-backed viewsTor Arne Vestbø2019-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The naïve approach used for layer-backing in the past caused a detach of the backingstore QImage on each beginPaint, since the image was assigned to the layer via a CGImageRef that participated in the QImage implicit sharing (and had to, so we couldn't get around that). We now use IOSurfaces, wrapped in a QPlatformGraphicsBuffer abstraction. The surfaces can be assigned to the layer's content the same way images could, but allows us to reason more closely about whether or a buffer is in use, and increases the chance that we will have a zero-copy path to the screen. Unless the window has requested a surface format with single buffering we use a dynamic swap chain of buffers. In most situations there will be two buffers in play, one assigned to the layer and one ready to paint to, but during resize and some other situations the buffers will grow temporarily to accommodate the increased back-pressure. Since QBackingStore is documented as having single-buffer behavior, we take care to persist content between the buffers before every swap. By doing this before swapping, instead of before each paint, we can avoid preserving areas that will be painted to anyways, and will in many situations (such as blinking cursors e.g.) end up not persisting anything. The RasterGL surface case is handled by reading out the buffer data and doing a manual texture upload. In the future we can support direct texture access via CGLTexImageIOSurface2D, but this requires QPlatformBackingStore::composeAndFlush to learn how to support other targets than GL_TEXTURE_2D, as CGLTexImageIOSurface2D only works with GL_TEXTURE_RECTANGLE_ARB targets. Fixes: QTBUG-48763 Fixes: QTBUG-72360 Fixes: QTBUG-71162 Change-Id: Ica12f69b244e54d0fd31c929730d15657c286af8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QOpenGLContext: fix docs about sharingGiuseppe D'Angelo2019-03-131-1/+1
| | | | | | | FBOs cannot be shared. Streamline the remainder of the sentence. Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Clear only one device from g_pointIdMap when all points releasedShawn Rutledge2019-02-262-2/+19
| | | | | | | | | | | | | The new test tst_QTouchEvent::touchOnMultipleTouchscreens() needs the touchpoint IDs to be predictable, but another test currently has a QEXPECT_FAIL; without release events, g_pointIdMap continued to hold the touchpoints that were there when the test failed. So it's necessary to add QWindowSystemInterfacePrivate::clearPointIdMap() to be able to call it in the test cleanup function. Fixes: QTBUG-73830 Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Remove requirement to lock graphics buffer before getting total sizeTor Arne Vestbø2019-01-291-1/+0
| | | | | | | | | | QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless bytesPerLine() is implemented in a way that requires it, in which case the assert should be in the subclass. Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QtGui: Unify license headersKai Koehne2019-01-297-43/+43
| | | | | Change-Id: I0a2553b95b099fdfa83d42e71bdf9a192a6588c7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-233-9/+6
|\ | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| * Doc: Restore documentation for QTest functions in other modulesTopi Reinio2019-01-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Make QWindow::type() reflect ForeignWindow statusMorten Johan Sørvig2018-12-221-2/+1
| | | | | | | | | | | | | | | | | | The Qt::ForeignWindow flag is or’ed to d->windowFlags by QWindow::flags(). Use this getter function instead of accessing d->windowFlags() directly. Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix layering violation in isForeignWindow()Morten Johan Sørvig2018-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformWindow::isForeignWindow() should return whether the native window is of the foreign window type, or false if the platform (plugin) does not support this concept. It should not call QWindow::type(), since that function may itself be implemented in terms of isForeignWindow(). Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | fix crash if no screens are availableRolf Eike Beer2019-01-211-3/+6
| | | | | | | | | | | | Fixes: QTBUG-73166 Change-Id: I936672b7a09a540d21e6dcd371f5ffe1e5536b85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix multiple emission of QGuiApplication::lastWindowClosed() when native ↵Friedemann Kleint2019-01-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | child widgets are used Run the handling in QWindowPrivate::maybeQuitOnLastWindowClosed() for top level windows only. Fixes: QTBUG-73061 Change-Id: I74deb50b06a64e8ef0e438d2abf14888f778a46e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-107-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Emit paletteChanged and send ApplicationPaletteChange on theme changeTimur Pocheptsov2019-01-082-0/+13
|/ | | | | | Fixes: QTBUG-72575 Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix crash in QSimpleDrag when no platform windowVal Doroshchuk2018-11-291-1/+1
| | | | | | | | | | | No need to return top level window if it was not created. It means no platform resources have been allocated. Events might not be delivered if the wrong window is returned. Fixes: QTBUG-70544 Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-192-5/+7
|\ | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| * Modernize the "settings" featureLiang Qi2018-11-152-5/+7
| | | | | | | | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-161-0/+6
|\ \ | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| * | Doc: Qt GUI: Fix documentation warningsTopi Reinio2018-11-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are minor typos or documentation warnings that snuck in with new features. Task-number: QTBUG-71502 Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Document QScreen::grabWindow high-DPI behaviorMorten Johan Sørvig2018-11-121-0/+5
| | | | | | | | | | | | | | | Change-Id: Ib32510ff30e907365e64921fda14e686a495c77c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Make grabWindow return pixmap with correct dprMorten Johan Sørvig2018-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devicePixelRatio on the returned pixmap should be the product of the Qt and platform scale factors. This handles the corner case of setting QT_SCALE_FACTOR on macOS with a high-dpi display. Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QtGui: Check event type in QWindowSystemInterface::handleMouseEvent()Friedemann Kleint2018-11-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assert on receiving double clicks which are currently not implemented. Task-number: QTBUG-71263 Task-number: QTBUG-70999 Change-Id: I85cd21665ecaf118584053de63745044728d8f5b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-094-5/+9
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * Doc: Clarify what samples() returns if not explicitly setAndy Shaw2018-11-071-1/+2
| | | | | | | | | | | | Change-Id: Icf4478121a9d67356eb976039c666d6945a2099c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Modernize the "textcodec" featureLiang Qi2018-11-073-4/+7
| | | | | | | | | | | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-11-052-1/+3
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979