summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* QtBase: use preincrement for iterator typesAnton Kudryavtsev2015-12-091-1/+1
| | | | | | | | | ... because it's useful for non-primitive types. Except for index-based loops, these were the only two remaining instances in QtBase. Change-Id: I0fafa502d78a70f98b4a90f4d3c7fdfbb401a90f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-0812-15/+81
|\ | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * WinRT: Prepend '.' to default file suffix.Friedemann Kleint2015-12-071-2/+4
| | | | | | | | | | | | | | | | IFileSavePicker::put_DefaultFileExtension() fails when the '.' is missing, causing the QtWidgets-based dialog to show up (Windows 10). Change-Id: Ifcb870431b792ffa8e4a608dec999225e8383fa9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * Android: Implement QInputMethod::keyboardRectangleOlivier Goffart2015-12-073-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use getWindowVisibleDisplayFrame to know the height on the keyboard, and we can use getLocationOnScreen to find out how much the view is scrolled. Since onPreDraw is always called when the view is scrolled or when the keyboard appears or disapear, we can call the native functions from there. This is not working for floating keyboards. [ChangeLog][Android] Implemented QInputMethod::keyboardRectangle Task-number: QTBUG-40731 Change-Id: I7848eb34fece410b29a06bf0bbb2313112fffa68 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * Respond with a sound for certain message boxes on windowsJan Arve Saether2015-12-043-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression (it worked in 4.8) that was probably introduced by the refactoring of the accessibility framework in Qt 5. Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called regardless of isActive(), so its the responsibility of each implementation of notifyAccessibilityUpdate() to check for isActive() where it matters. Task-number: QTBUG-33303 Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text.Friedemann Kleint2015-12-041-0/+5
| | | | | | | | | | | | Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| * windows: enable drop for embedded windowsTim Blechmann2015-12-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | when embedding a QWindow into a native win32 window hierarchy, dragndrop is not working, as RegisterDragDrop is not called. the parent HWND is wrapped via QWindow::fromWinId(), which is topLevel, but a Qt::ForeignWindow. it's children are not topLevel. we therefore add a conditon to call RegisterDragDrop on non-topLevel windows whose parent is a Qt::ForeignWindow Change-Id: Id2bfa1130857c21566feae9cb10b62b648d86a72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * eglfs: Fix the logical dpi calculation for some devicesLaszlo Agocs2015-12-023-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | KMS and backends using the default logicalDpi() implementation (EGLDevice for instance) did not correctly check if the physical width and height are greater than zero. The result is a NaN dpi on systems where the drivers report a zero size. This in turn breaks font rendering and various other things. isValid() is changed to !isEmpty(). This way we check for width and height > 0 instead of >= 0. Change-Id: I8cdcf93a116379ae33c65599ad792a3b712518a3 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-0248-284/+446
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Differ between vertical and no hinting on WindowsEskil Abrahamsen Blomfeldt2015-12-023-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symmetric text rendering seems to be the equivalent to no hinting at all since it does subpixel antialiasing in both horizontal and vertical directions. Let people select non-symmetric, natural rendering as well, by setting vertical hinting on the font. This is the mode used for many UI elements in newer versions of Windows (like the title bar of windows etc.) [ChangeLog][Windows] Added differentiation between vertical hinting and no hinting in DirectWrite font engine. Task-number: QTBUG-48546 Change-Id: I2f75ae2d16fdf26706587d92da43daf29afbbcf2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * DirectWrite: Inherit synthesized properties for fallback fontsEskil Abrahamsen Blomfeldt2015-12-021-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | When a fallback font is selected, we need to copy out the properties from the main font which can be synthesized by the font engine. In particular, this is weight > normal, and oblique style. This is the DirectWrite equivalent of a856c4a902816a7d691ca50e6f556521287be441. Change-Id: I5d1215c66a433c8a8029c06e7a3dcee287f3f76f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Windows: Load DirectWrite dynamically.Friedemann Kleint2015-12-022-16/+37
| | | | | | | | | | | | | | | | DirectWrite is not supported on Windows XP. Task-number: QTBUG-49711 Change-Id: Ie1df6250814226d53fe4fb3a1c6bd024f6018796 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Windows QPA: Fix window state transition from minimized to normal.Friedemann Kleint2015-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to ShowWindow() to enforce the window to be restored to normal state, even if the state before minimized was maximized. Task-number: QTBUG-48449 Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Rename ANGLE libs in order to not conflict with other ANGLE libsJan Arve Saether2015-12-012-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to be able to use Qt (with dynamic ANGLE) in a plugin while the host runs a different version of Qt (and ANGLE). In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables you also need to update the value of the LIBRARY definition in the .def files for ANGLE: qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def Task-number: QTBUG-48431 Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Don't use QT_AUTO_SCREEN_SCALE_FACTORMorten Johan Sørvig2015-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | With the addition of Qt::AA_EnableHighDpiScaling testing of the env. variable only is no longer sufficient. Use QHighDpiScaling::isActive() instead, which is available at the time loadAndroidStyle is called. Change-Id: Iaa6bbb5a04a71fa3bd68f3bdc8c8bcdfb5d1778f Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * QtBase: combine adjacent qDebug()/qCritical() linesMarc Mutz2015-11-282-23/+23
| | | | | | | | | | | | | | | | | | For qDebug() and qWarning(), this is just an optimization. For qCritical(), which can be fatal, the old code was just wrong. Change-Id: I6d8ab1d7531d766cd41b49569dc0fd4420ecab8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-2833-267/+267
| | | | | | | | | | | | | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Windows: Open GL blacklist - Disable rotation for Intel HD Graphics 4000 / 5500.Friedemann Kleint2015-11-271-0/+12
| | | | | | | | | | | | | | | | The driver causes crashes when switching orientation in full screen mode. Task-number: QTBUG-49541 Change-Id: I8293d4b2f2981fa627654d06894a74c922304ac3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Windows Open GL blacklist: Introduce keyword "disable_rotation".Friedemann Kleint2015-11-273-5/+21
| | | | | | | | | | | | | | | | | | | | | | Add a flag to disable rotation to the Renderers enumeration of QWindowsOpenGLTester triggered by the keyword "disable_rotation". Specifying this keyword forces the application to landscape mode for Desktop GL. It is intended for drivers that have issues with rotation. Task-number: QTBUG-49541 Change-Id: I0f0bb7415c59e98648be09b34a59dd201d52b211 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Windows QPA: Add API for setting the application orientation preference.Friedemann Kleint2015-11-274-1/+81
| | | | | | | | | | | | | | | | | | | | Dynamically load the Win32 API functions for setting the rotation preference and map this to static functions taking a Qt::ScreenOrientation in QWindowsScreen. Task-number: QTBUG-49541 Change-Id: I1c81cf6274d79a023a2ee755dd7c085ffd7cc015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-272-2/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_p.h src/network/ssl/qsslsocket_mac.cpp src/network/ssl/qsslsocket_mac_p.h src/widgets/kernel/qwidget.cpp Change-Id: I39592cb37d710dfaf8640769ba3c1b637927d7f4
| | * iOS: always flush spontaneous key press eventsRichard Moe Gustavsen2015-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we changed sending key events through QPA instead of directly to the focus object, we only flushed from deleteBackward (06be9f026). The reason was to avoid unnecessary flushes, as this in general can be a source to recursion problems. It turns out that this is also needed when sending Qt::Key_Return. The reason is that we sometimes resign first responder when the return key is pressed, which will also change the focus object in Qt. And without flushing the key event first, it will be processed after the change and therefore end up at the wrong object. It seems like the most sensible thing is to always flush upon receiving spontaneous key/text events from iOS, which is also how it was before. Task-number: QTBUG-49021 Change-Id: I44885a11275dee5039ef6a8abbcbdadc092695e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * Fix build with 'udpsocket' feature disabledAlex Trotsenko2015-11-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap related code in QNativeSocketEngine and the tuiotouch plugin in conditionals. Change-Id: Ic6861b1c6a9e041fa8a50f96149f7280473a9fba Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QWindowsFontDataBase: use QSharedPointer::create()Marc Mutz2015-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | More efficient, because control block and tracked object are co-located in a single memory allocation. Change-Id: Ibd1a37836b96837afd6209a743a05a727dbc9907 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove Carbon API usage.Jake Petroules2015-12-011-31/+28
| | | | | | | | | | | | | | | | | | | | | | | | The new API has been available since 10.6 or 10.7 and the debugger indicates it simply calls through to TransformProcessType. Change-Id: Ia8f82d7426cb409aca8fd5feb8e43e1b0e79f8f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-2941-139/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | AndroidStyle: use std::make_shared()Marc Mutz2015-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | More efficient, because control block and tracked object are co-located in a single memory allocation. Change-Id: Id18e2d06db43568eb34c2e2d129d1b116af73acb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devSimon Hausmann2015-11-2717-171/+234
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-2717-171/+234
| |\| | | | | | | | | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| | * | Avoid pulling in X11 headers in brcm backendLaszlo Agocs2015-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some configurations we may end up using Mesa's EGL headers instead of the Broadcom ones. Make this work by setting the usual define to prevent including Xlib headers that then conflict with all sorts of things in QtCore. Change-Id: I4970553428e5b0e81bd76694980f3b6b194ae4c2 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| | * | Fix potential division by zero.Nicolas Capens2015-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a Chrome Remote Desktop session the htotal and/or vtotal timings can be zero and lead to a SIGFPE exception. Task-number: QTBUG-49322 Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
| | * | iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devicesTor Arne Vestbø2015-11-262-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As 3D touch can be disabled/enabled at runtime on those devices, we need to watch for changes to the relevant settings and update the touch device capabilities that we report to the user. Note that iOS will deliver touchesBegan with a touch force of 0, which we will reflect/propagate as a 0 pressure, but there is no clear alternative, as we don't want to wait for a touchedMoved before sending a touch press event to Qt, just to have a valid pressure. Change-Id: I47fb8a9f98ab3244e16a337bbfcf1fe24e4c7aa2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * | xcb: Don't assume creating a window will result in ConfigureNotify eventTor Arne Vestbø2015-11-242-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We assumed that creating a window would always result in a configure notify event, so we delayed sending the initial expose event until receiving the configure notify. That strategy fails in cases where the window does not need a reconfigure after being created, such as when not running a window manager, or when creating child windows. In those cases the window is just mapped, and we ended up never sending an expose event. The problem was masked by sometimes receiving an explicit expose event from X, just after the mapped notification, which we then sent without waiting for configure. Unfortunately we can't rely on this behavior and need to remove the deferred expose event logic, so that we always ensure that at least one expose event is sent to Qt. Change-Id: I702be7f24de2a1e89c085fb6bd95bb8ff7792a27 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | * | winrt: Fix text renderingMaurice Kalinowski2015-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of aecf3006bddb959795d03dd72d9c520e49713913. The DPI needs to be set inside the constructor to have the text rendering initialize properly. Landscape orientation fix is still valid and the dpi change was unrelated to resolve QTBUG-49470. Task-number: QTBUG-49610 Task-number: QTBUG-49470 Change-Id: I928b8d291b65cd744731c009917804b96253c276 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | QPI/Cocoa: QNSView - guard removeFromSuperview by autorelease poolTim Blechmann2015-11-232-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removeFromSuperview could be called from outside the Qt domain (e.g from a native cocoa gui). we need to guard it by an autorelease pool to make sure that potential release/dealloc methods are not postponed to a point when we do not have a qapplication anymore Change-Id: If65cce4c524a16ffee125694c534f900c7d08fa8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * | Windows: Fix the size of drag cursors in multi-screen setups.Friedemann Kleint2015-11-234-105/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move QWindowsDrag::defaultCursor() to the per-screen instance of QWindowsCursor so that the cached default drag cursor pixmaps are created with the correct size per screen. Task-number: QTBUG-49511 Change-Id: I02f75ac3b1e5e064325b066ee03e1d5c8a7c7ee8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * | Windows: Scale cursors from resource pixmaps according to screen.Friedemann Kleint2015-11-232-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsCursor::customCursor() uses a best match algorithm to find the most suitable pixmap for the cursor size obtained from GetSystemMetrics(). This size is correct for the primary screen only; in High DPI + normal monitor multiscreen-environments, the cursors will be too large on the secondary monitor. Pass the platform screen to apply a correction factor based on logical DPI to obtain the correct size. Task-number: QTBUG-49511 Change-Id: I8a64a969e3ade7ab5029e3ae904a0bcbb4704f90 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | Windows: Scale pixmap/bitmap cursors when High DPI scaling is active.Friedemann Kleint2015-11-232-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply a per screen scale factor, also taking the device pixel ratios of the pixmaps into account. Task-number: QTBUG-49511 Change-Id: If46b6eeb37635c2c4046992c1ba06711ccf54eae Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | Windows: Create one QPlatformCursor per screen.Friedemann Kleint2015-11-234-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pixmap-based cursors and some of the standard cursors we create from resource pixmaps need to be separated per screen. Use a QScopedPointer containing the per-screen cursor instead of the previously used QSharedPointer containing the cursor shared by all screens. Task-number: QTBUG-49511 Change-Id: I5203fcc4ecf5a7ff3fea833a4eaeb5300a6e6d54 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * | xcb: Fix windows opened from keyboard are not active on Marco or Xfwm4Błażej Szczygieł2015-11-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows opened from keyboard (e.g. keyboard shortcut) are not active on Marco or Xfwm4. These windows are under the window which received the key event. This patch fixes the problem by updating XCB timestamp on every key press like Qt4 does. Task-number: QTBUG-49567 Change-Id: I9ea483784ac361d0b645d0f11f643868b367ac2c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * | Mirclient: Avoid hardcoding the platform api choiceEirik Aavitsland2015-11-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When built in by the debian scripts, a symbol PLATFORM_API_TOUCH would be defined for relevant target platforms. Here in Qt, this does not apply. On a correctly installed system, the UBUNTU_PLATFORM_API_BACKEND variable is not required at runtime, since the system's value will be read from a settings file under /etc. Also, the previous hardcoding would mean that it could not be overridden at runtime. Change-Id: I24ddfaa254005b4113f3328b66edb1c6bbc509e2 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | | | Remove dead code.Jake Petroules2015-11-276-28/+4
|/ / / | | | | | | | | | | | | | | | Change-Id: Idfaef408536bafbb31444ec8728dbcf289abac8d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Accept concurrent input from multiple tablet devices in QGuiApplicationRomain Pokrzywka2015-11-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to 352c357e6f0785c0775a85151d6716b47aea1006 enabling support for multiple evdevtablet plugins at runtime (one per device), we also need to adjust the way QGuiApplication handles the events received from those plugins, in particular when multiple devices are sending tablet events concurrently. Replace the static members in QGuiApplication by a vector storing the same data per-device, so tablet press/release events can be recognized independently. Change-Id: Ie0975cdb03a8f6d05903e2e2e57ceb9de73a74a4 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | Fix kerned advances in QRawFont on OS X and WindowsEskil Abrahamsen Blomfeldt2015-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the wrong value was used to calculate the design-to-device scale. The assumption has been that tmHeight in the TEXTMETRIC is the pixel size of the em square, but it is not, it's the height of the font (ascent + descent). The pixel size of the font is defined to be the em square size in pixels. On OS X, the kerning data was never actually read from the font. I've added a lazy initialization for this similar to the one in the FT engine. This was discovered when investigating QTBUG-48546, as it turned out that the kerning information extracted by Qt in this case was different from the one used by Harfbuzz. I've changed testfont.ttf to kern "_2" so that the digit is positioned directly on top of the underscore and constructed a test. [ChangeLog][QRawFont] Fixed kerning on advances in QRawFont for OS X and Windows. Change-Id: Ic9a321ad119ea880cef89b861c75a820ab8d3182 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Xcb: propagate stays-on-top or -below hints from window flagsUlf Hermann2015-11-252-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, you had to first hide a window, then set the flags, then show it again as the flags were only applied when showing the window. This is unintuitive. Task-number: QTBUG-49628 Change-Id: I240e633ac2581c0ff0e4f35dead1b79e15e15350 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-2319-199/+155
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * | Windows: Implement QPlatformTheme::WheelScrollLines.Friedemann Kleint2015-11-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Obtain the system setting via SystemParametersInfo(), amending fac71528cce279282d66b0a96ddd8570d567955f. Task-number: QTBUG-49561 Change-Id: Ie7a956fdc6b175ad09356949645c1e8937053abd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Windows: Fix calculation of frame offset for layered windows.Friedemann Kleint2015-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pass 0 window to High DPI scaling function to prevent it from trying to find a screen and applying a screen offset. Task-number: QTBUG-49516 Change-Id: Ib3e1919985f2c6df1dd8369f6e28b3ee1fdb7afe Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * | Windows: Refactor cursor handling.Friedemann Kleint2015-11-205-177/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying scaling to the pixmaps used in pixmap cursors requires applying a scale factor in a code path now in a constructor of QWindowsWindowCursorData (nested into QWindowsWindowCursor). This needs to be split and the code paths for cursors created from a Qt::CursorShape value and pixmap cursors need to be further separated. Replace the QSharedDataPointer-based QWindowsWindowCursor class by a simple, non-copyable class CursorHandle managing the HCURSOR handle and pass it around using a QSharedPointer. Split the cache in QWindowsCursor into one based on Qt::CursorShape and one based on the cache key aggregated from the pixmap cache keys (using QWindowsPixmapCursorCacheKey renamed from QWindowsCursorCacheKey), simplifying the standard case based on Qt::CursorShape. Reuse class CursorHandle in QWindowsOleDropSource::CursorEntryCursorEntry, which used a similar class. Remove QWindowsCursor::createSystemCursor(). Avoid the construction of temporary QCursor objects for the standard cursors constructed from using resource pixmaps by introducing a struct PixmapCursor containing pixmap and hotspot. Task-number: QTBUG-49511 Change-Id: I5393d64bd70f7dab68c0a8c2255c7685ac367b2f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>