summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* iOS: convert directory in qiosfiledialog to local file before checking filenameRichard Moe Gustavsen2015-03-151-1/+2
| | | | | | | | The directory URL will now have the scheme "file". So we need to convert it to a local file before we inspect the file name Change-Id: Ib50f879501f560a4d0fec41dce6d7d9f78f06a3c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: return file urls rather than asset urls from file dialogRichard Moe Gustavsen2015-03-152-8/+19
| | | | | | | | | | | | We need to pass the asset url around as a file url in the application, so that QUrl::fromLocalFile()/toLocalFile() works. Note that QUrl::fromLocalFile() will remove double slashes. We therefore need to check for this, and restore missing slashes, when loading files in the file engine. Change-Id: I2de6b91d7a112354590cf2981f7b403eacf92a59 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* eglfs: Report the QScreen refresh rate from eglfsLaszlo Agocs2015-03-146-0/+21
| | | | | | | | | | | | For KMS we can always know the correct rate so report it from the backend's custom screen implementation. For the rest, query from the framebuffer. If the fb driver publishes the timings then we can calculate the vertical refresh rate from them. If not, default to 60. Task-number: QTBUG-44971 Change-Id: I854a34e7c0d652790cc2ac967715828ec76f5733 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Introduce src/3rdparty/freetype.pri for better maintenanceKonstantin Ritt2015-03-141-60/+2
| | | | | | | | This deduplicates qmake rules in platformsupport and platform plugins. Change-Id: Ie9c7d933c4433b96bf502e9753a12faa238b4569 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Windows: Introduce delayed population to the FreeType font database.Friedemann Kleint2015-03-122-64/+148
| | | | | | | | | | | | | | | | | Further Split apart Windows CE/Windows code paths to provide 2 implementations of populateFontDatabase(): - The desktop version uses a callback which only registers the font families using QPlatformFontDatabase::registerFontFamily() to be populated on demand later by populateFamily(). - The Windows CE version is unchanged. Task-number: QTBUG-43774 Task-number: QTBUG-44647 Change-Id: Iad4ec849006a4daf86a5caea9afc89e83ccc7c63 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* xcb: Add support for obtaining default xcb connectionJan Kundrát2015-03-122-0/+10
| | | | | | | This is needed by qtx11extras now that we can meet a nullptr QScreen. Change-Id: I755523cbbbbe188f454bd518d2d86a981542458f Reviewed-by: Richard J. Moore <rich@kde.org>
* eglfs: don't build the cursor atlas when QT_NO_CURSOR is definedAndrew Knight2015-03-122-1/+3
| | | | | | Change-Id: I675bc127296c016a40ec2edfdb6602908fec4c2f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Clear backingstore for windows with alpha channel.Morten Johan Sørvig2015-03-122-0/+13
| | | | | | | | | Fixes painting artifacts in translucent windows. Change-Id: I89c198e5636c5387e67ad8839d32dffdc0a149cb Task-number: QTBUG-43017 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix bunch of other segfaults due to null screensJan Kundrát2015-03-121-12/+35
| | | | | | | | | | | | | | | | | | | | | | | This was motivated by a real segfault: #0 QScreen::handle (this=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/gui/kernel/qscreen.cpp:112 #1 0x00007faaf5d5e85e in QXcbNativeInterface::connectionForWindow (this=this@entry=0x7fab04d684f0, window=window@entry=0x0) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:483 #2 0x00007faaf5d5fa53 in QXcbNativeInterface::nativeResourceForWindow (this=this@entry=0x7fab04d684f0, resourceString=..., window=window@entry=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:304 #3 0x00007fab048b8b57 in QX11Info::connection () at /var/tmp/portage/dev-qt/qtx11extras-5.5.9999/work/qtx11extras-5.5.9999/src/x11extras/qx11info_x11.cpp:358 #4 0x00007fab02ce14c6 in NETEventFilter::nativeEventFilter (this=0x7fab04ea5e70, ev=0x7faaec003a60) at kwindowsystem-5.7.0/work/kwindowsystem-5.7.0/src/kwindowsystem_x11.cpp:229 ...at which point I tried to stop playing the get-backtrace-patch-rebuild-repeat cycle and looked at the stuff which looked fishy to my untrained eye. So this is speculative in nature, but I think that each of these cases can be hit and dereference a nullptr. Change-Id: I046debaa1b49fa55e876247fc62f3eb924496fe8 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Get CoreText style name when resolving Qt fontGabriel de Dietrich2015-03-121-11/+4
| | | | | | | | | | | | | Since we use CoreText API to populate the font DB, we should also make sure we use consistent data when doing queries. This partially reverts and ameds b619c35d8507eee. Change-Id: I6a3470fbee719ae1ea3085c252a4870040b9af1a Task-number: QTBUG-41487 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: ensure keyboard is visible, even when IM hints hasn't changedRichard Moe Gustavsen2015-03-121-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | When showing a QWindow, we transfer first responder status to its QUIView. If another QWindow was active with a text responder at that point, the text responder will loose first responder status in favor of the new view, and the keyboard will hide. Now, if the new window has a focus object with the same IM state as the previous focus object (in the previous window), m_imeState will not change, and QIOSIntegration::update() will assume that nothing needs to be done to show the keyboard, even if it's actually hidden. This patch will change the logic, so that we: - show the keyboard if its supposed to be visible, even if m_imeState did not change. - Only recreate the text responder if it needs a different configuration than the one we already got (not only from changes to Qt::ImEnabled) Task-number: QTBUG-40695 Change-Id: I6f6788af4cbff5c7abe4f5a29e23a7cefea6b711 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Prepare QIOSIntegration for handling plugin optionsTor Arne Vestbø2015-03-122-13/+23
| | | | | | | | | | QGuiApplication sets options passed to the plugin through -platform as properties on the QPlatformNativeInterface. To handle those we need to inherit QPlatformNativeInterface first (which is the QObject subclass), and include the Q_OBJECT macro. Change-Id: Ia496851c64cbb0036c26e7ed0683d0ecfa8319cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Cocoa: Correct mouse event forwarding for popupsMorten Johan Sørvig2015-03-125-20/+82
| | | | | | | | | | | | | | | | | | | | We need to track the active popup globally, having parent windows track child popups is not sufficient since there may be one or more intermediate windows in between the event receiving window and popup window. Add API to QOCocoaIntegration for tracking the global popup window and use it instead of the per-window tracking. Make sure to only close popups on clicks outside the popup only. Add code to QNSView::handleMouseEvent that redirects mouse events to the active popup. Add manual test. Change-Id: Ia3e3fd42d8fddf5c69f0c6879b333ca544521f61 Task-number: QTBUG-43464 Task-number: QTBUG-31937 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Fix segfault when requesting root window and there are no screensJan Kundrát2015-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This was easy to hit with KDE Plasma 5.2.1; KWindowSystem called QX11Info::appRootWindow() which in turn tried to dereference a nullptr returned from QXcbConnection::primaryScreen(). #0 QXcbConnection::rootWindow (this=<optimized out>) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbconnection.cpp:1303 #1 0x00007fc26da096d7 in QXcbNativeInterface::rootWindow (this=this@entry=0x7fc27d1734d0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:425 #2 0x00007fc26da0ab21 in QXcbNativeInterface::nativeResourceForIntegration (this=0x7fc27d1734d0, resourceString=...) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:223 #3 0x00007fc27c563148 in QX11Info::appRootWindow (screen=screen@entry=-1) at qtx11extras-5.5.9999/work/qtx11extras-5.5.9999/src/x11extras/qx11info_x11.cpp:158 #4 0x00007fc27a98c444 in NETEventFilter::nativeEventFilter (this=0x7fc27d425b60, ev=0x7fc264004ad0) at kwindowsystem-5.7.0/work/kwindowsystem-5.7.0/src/kwindowsystem_x11.cpp:192 #5 0x00007fc2795d0a8a in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7fc264004ad0, result=result@entry=0x7ffc96ecf348) at qtcore-5.5.9999/work/qtcore-5.5.9999/src/corelib/kernel/qabstracteventdispatcher.cpp:460 #6 0x00007fc26d9ea941 in QXcbConnection::handleXcbEvent (this=this@entry=0x7fc27d173580, event=event@entry=0x7fc264004ad0) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbconnection.cpp:971 Change-Id: I98a5d767cd7e143f00666f6fc78e9dc10893513d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* eglfs_kms: Use a QByteArray for connectorNameAndrew Knight2015-03-121-10/+11
| | | | | | | | | Using a byte array here simplifies the logic while being more efficient. It also removes warnings about using deprecated QString methods. Change-Id: Ia1384dfb92e953c56179647b92a41b59cd26d9ea Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* windows: Introduce a built-in GPU blacklistLaszlo Agocs2015-03-116-35/+73
| | | | | | | | | | | | | | | | | | | | | | | Use a built-in JSON file in case the QT_OPENGL_BUGLIST environment variable is not set. When QT_OPENGL_BUGLIST is set, the built-in list is ignored. To make the implementation simpler and more readable, some of the code in QWindowsOpenGLTester is reshuffled a bit. It also caches the results now, so it is safe and fast to call supportedRenderers() and friends multiple times. The blacklist currently contains the Intel card from QTBUG-43263 (Intel GMA / HD3000 ?) and may also apply to QTBUG-42240. [ChangeLog][QtGui] Qt now contains a built-in GPU driver blacklist for Windows that disables the usage of desktop OpenGL with some older cards that are known to be unstable with opengl32.dll. Task-number: QTBUG-42240 Task-number: QTBUG-43263 Change-Id: I1ecd65b51fca77925317d52048e7ab01d9b8797c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QShortCut: Check whether the menu is QPA-disabledGabriel de Dietrich2015-03-112-0/+6
| | | | | | | | | | | | When climbing the menu hierarchy, it's sounder to check whether the actual QPA menu is enabled. This way we can trigger modifier-less shortcuts even in submenus. Task-number: QTBUG-38256 Task-number: QTBUG-42584 Change-Id: I13a27027306bce0f0732b05bf9469f3b77028f73 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Enhance EGL_CONTEXT_LOST checksLaszlo Agocs2015-03-115-13/+30
| | | | | | | | | Apparently failures can occur not just when doing eglMakeCurrent() but also when creating window surfaces. Change-Id: Ife1210293d5120fd41352164d9c89e83fb5ce468 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* xcb: another QXcbScreen null pointer checkShawn Rutledge2015-03-111-0/+2
| | | | | | | | | | In QXcbWindow::setParent(), the window may not have a screen, and in that case we cannot get the root window in this way. Task-number: QTBUG-44719 Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Only set the touch flags if the window is not already registeredAndy Shaw2015-03-113-2/+11
| | | | | | | | | It is possible for there to be a HCBT_CREATEWND hook which can set the touch window flags already while the window is being created. Therefore we want to defer to those settings instead as they should take precedence. Change-Id: If8dcbd34db2b3bbbfb1bc36731665fb17fb87c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Improve handling of XRandR events in XCB backendDaniel Vrátil2015-03-114-136/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | Querying X server for data can be very expensive, especially when there are multiple processes querying it at the same time (which is exactly what happens when screen configuration changes and all Qt applications receive XRandR change notifications). This patch is aiming to reduce the number of queries to X server as much as possible by making use of detailed information available in the RRCrtcChangeNotify and RROutputChangeNotify events. Firstly, the backend now does not rebuild all QXcbScreens on any change (which involved the very expensive xcb_randr_get_screen_resources() call), but only builds the full set of QXcbScreens once in initializeScreens(), and then just incrementally updates it. Secondly, it avoids querying X server for all screens geometry as much as possible, and only does so when CRTC/Output change notification for a particular screen is delivered. As a result, handling of all XRandR events on screen change is reduced from tens of seconds to less then a seconds and applications are better responsive after that, because we don't block the event loop for long. The X server is also more responsive after the screen change, since we are not overloading it with requests. Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* iOS: Only use root level native runloop if at first level of processEventsTor Arne Vestbø2015-03-102-13/+9
| | | | | | | | | | | | | | | We used to support calling QEventLoop::exec() from within a processEvent recursion and still jump down to the root native runloop, but this does not work as intended due to how QEventDispatcherCoreFoundation uses flags in its ProcessEventsState for e.g. deferred wake up or timer updates. The logic in QEventDispatcherCoreFoundation assumes that the next recursion to processEvents will be handled by itself, so that it can interpret the flags in ProcessEventsState. The iOS event dispatcher subclass, QIOSEventDispatcher, does neither of these things, and should only be used from a 'clean' state. Change-Id: I44fa156feecc45772806002465c35bef0797ead2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Handle an QIOSViewController outliving its related QIOSScreenTor Arne Vestbø2015-03-101-1/+1
| | | | | | | | | | | We release the UIWindow that retains QIOSViewController in the QIOSScreen destructor, but other parts of the OS may have retained the view controller, so the dealloc may not happen until later. In the meantime we may receive calls to shouldAutorotate, so we need to guard this code for the situation that m_screen has been deleted. Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Fix design metrics for text on WindowsEskil Abrahamsen Blomfeldt2015-03-091-3/+3
| | | | | | | | | | | | | | | The trick to get design metrics on Windows is to request the font with the design size, however we were passing the em square size in as the cell height instead of the em square size (aka character height in Windows docs). This would give us hinted metrics and thus the design metrics would differ from other platforms. [ChangeLog][Windows][Text] Fixed design metrics for text Task-number: QTBUG-44501 Change-Id: I4cffc3b86359cfdaf2ece07e1259f6fa862132bc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPA plugins: Fix const correctness in old style castsThiago Macieira2015-03-095-6/+6
| | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946899b4ba15b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* eglfs_kms: remove deprecated QString usesAndrew Knight2015-03-091-9/+9
| | | | | | | | | Fixes "warning: ‘QString::QString(const char*)’ is deprecated" While we're here, make the locals const. Change-Id: Iee70253a46f91937b93e06cc08cd361716cd669d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Fix build of qwindowsfontdatabase.cpp with MinGW 4.9.2/-Werror.Friedemann Kleint2015-03-061-0/+7
| | | | | | | | | Disable warning: qwindowsfontdatabase.cpp: In member function 'virtual QFontEngine* QWindowsFontDatabase::fontEngine(const QByteArray&, qreal, QFont::HintingPreference)': qwindowsfontdatabase.cpp:1111:74: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Change-Id: Ifce69db7d1f3b78d52e5b4e01db8e7bbfb62b439 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* xcb: do not create a dummy QScreen when there are no outputsShawn Rutledge2015-03-061-10/+5
| | | | | | | | | | | | | | | | Whenever a QWindow is associated with a QScreen, the screen is expected to be a real working one, so that rendering continues to be possible. This partially reverts 52f5e50f11a3ba82e32dc2efc656e4021a3fa4f5 [ChangeLog][QPA][Xcb] If all QScreens (xcb outputs) are disconnected while an application is running, QGuiApplication::primaryScreen() will return null until a screen is connected again. Task-number: QTBUG-40174 Task-number: QTBUG-42985 Change-Id: Id1b29dd70eaf3f2e7fd477516ce7e2bf24e095f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Avoid crashing when there is no QWindowsIntegration anymoreLaszlo Agocs2015-03-061-1/+4
| | | | | | | | | | | When destroying the QWindowsIntegration, the global instance is set to null in the destructor. This is followed by a lot of additional steps when destroying the members. Some of that cleanup calls to staticOpenGLContext() which was not handling the case of the integration global instance being null. Change-Id: Ib74faf491d4c81635934547968ec91e9dceec6e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* iOS: Use qFatal when detecting QApplication before UIApplicationMainTor Arne Vestbø2015-03-061-6/+4
| | | | | | | | | Gives a stack-trace at the point the error was caused, making it easier to debug what's going on. Change-Id: I0d65bb5061e9a97c142d41f6c99a1a1803cbe82d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix up signal handling in QFbVtHandlerLaszlo Agocs2015-03-062-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Start using signalfd where we can. Drop the crash (SIGSEGV, SIGBUS) handling completely. The crash handling that was in place previously was not async-safe. It also prevented getting a core dump. So just remove it. There is no safe solution for a single application process since restoring the keyboard, video modes, etc. all need unsafe calls in the signal handler almost for sure. We can however improve the handling of non-crash scenarios greatly: Introduce support for SIGINT, allowing nicely and cleanly restoring the video mode with the KMS backend when pressing Ctrl+C while QT_QPA_ENABLE_TERMINAL_KEYBOARD is set. Same goes for keyboard suspend (SIGTSTP, Ctrl+Z). When QT_QPA_ENABLE_TERMINAL_KEYBOARD is set, platform plugins now have the possibility to act upon Ctrl+Z. As an example eglfs' KMS backend is enhanced to handle this by restoring the video mode before suspending the process, and reinitializing when brought into foreground again (SIGCONT). SIGTERM is also handled. This is extremely handy when starting an application locally on the embedded device and then kill-ing it via a remote ssh session. Keyboard and video mode is now cleanly restored. Finally, when disabling the keyboard, try setting also KDSKBMUTE. Change-Id: I2b3608dc23c798e2b39f74cb27f12dcb0e958435 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* eglfs: Pluginize RPi, iMX6 and Mali backendsLaszlo Agocs2015-03-0518-6/+699
| | | | | | | | | | | | | | eglfs does not depend on the device makespecs anymore when it comes to these device integration backends (hooks). Instead, backends are autodetected by configure. The name of the preferred plugin is still set in the device makespecs. This is optional. When not set and there is more than one plugin present in the system, the environment variable QT_QPA_EGLFS_INTEGRATION will have to be set at runtime. In the absence of that, the order is undefined. Change-Id: Ie1ced2c9aa1beff2adb13b4fdea7c499cb5a6aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Remove debug formatting functions obsoleted by the new debug operator for ↵Friedemann Kleint2015-03-053-65/+5
| | | | | | | | QFlag<T>. Change-Id: I6d737eb86b790eeefb537ca5e6a075bf30a3dcfb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Windows plugin: Simplify cursor code in platform screen.Friedemann Kleint2015-03-052-8/+8
| | | | | | | | | Change the shared pointer to store a QPlatformCursor instead of QWindowsCursor, removing the dependency of qwindowsscreen.h on qwindowscursor.h. Change-Id: I8b4bbc9fd4d5046c30ac3784f14229a9cc6d8dc6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Clean headers in the Windows plugin.Friedemann Kleint2015-03-0512-24/+18
| | | | | Change-Id: Ibc6b904e6e0b21f5daa0730a7eda2cae43cd3dcf Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Clean headers in the Direct2D plugin.Friedemann Kleint2015-03-058-13/+21
| | | | | Change-Id: Iab85ccdf49ee81214ada87a2e476f650b39a29ce Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Android: Make sure applicationState is set correctlyBogDan Vatra2015-03-053-1/+11
| | | | | | | | | | The Activity onResume function is always called before the application gets initialized and we let the applicationState set to the default value which is AppicationInactive. Change-Id: Ifc3c7e3dfc51f2b821f8ca87f8b711f485b6a6f8 Reviewed-by: Peter Rustler <peter.rustler@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* XCB: Solve crash when plugging a screen with unshown QWindowThiago Macieira2015-03-041-1/+2
| | | | | | | | | | If a QWindow has never been shown, it has no platformWindow (it's null). So it's a valid condition and we need to be sure that the pointer isn't null before dereferencing it. Task-number: QTBUG-44766 Change-Id: Ia0aac2f09e9245339951ffff13c7eb024d6a0773 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-5/+19
|\ | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Register font's english name as alias when populating font databaseLiang Jian2015-02-271-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register font's english name as alias in the callback of EnumFontFamiliesEx() at the time QWindowsFontDatabase::populateFontDatabase() is being called. This will help us to resolve english font family name to its corresponding localized alias once windows font database has been populated. It will also fix an assertion in Chinese Windows. Task-number: QTBUG-44647 Change-Id: I265d93c16a1677a7f31ff56d60c24f6e90666419 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | xcb: Don't log mouse moves by defaultShawn Rutledge2015-02-271-2/+4
| | | | | | | | | | | | | | | | | | It produces too much log output, so now it must be enabled by both defining Q_XCB_DEBUG and enabling the qt.qpa.input category. Change-Id: Id2eb7545a7cd07dadd70da31a1f17c2999feec0d Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | OSX: fix leaks due to missing NSAutoreleasePoolErik Verbruggen2015-02-267-0/+13
| | | | | | | | | | | | | | env OBJC_DEBUG_MISSING_POOLS=YES qtcreator Change-Id: Ibbe5f42af5b94a439be3f0dd0f2b6e34bb1afd3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Remove unused CGImage in qcocoabackingstoreAllan Sandfeld Jensen2015-02-262-16/+0
| | | | | | | | | | | | | | | | | | Since 916dfcb8275bcce6b39606cd0b930239a60dc5df m_cgImage has been unsed in the QCocoaBackingStore and can be removed. Change-Id: Ib289b1a3b848e05dda2dfc76ca5d857770883a0b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Fix android menubar's menu not opening at the first press.Michal Klocek2015-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of selected item in submenu, call aboutToHide() on still visible menus. This will allow quickquickcontrols to act poperly when menus are closed. This patch is a resubmission of dbd6d158e3002689c4c367709d68744465ffd9ec which was merged to dev although it should have targeted 5.5. Task-number: QTBUG-42188 Change-Id: I868cc6fc8403f0586f35a1734e0cb026982f6063 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | qiosmenu: Move "Done" button to the rightKai Uwe Broulik2015-02-251-4/+4
| | | | | | | | | | | | | | The "Done" action is traditionally on the right. Change-Id: I2497b878b552a9bcf69827a0ab85f1931067a023 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Fix invocations of static methods of QGuiApplication/QApplication.Friedemann Kleint2015-02-251-2/+2
| | | | | | | | | | | | Change-Id: I99ba58763f6063fa2a6f511adbea0163cce7ea32 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-2511-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: add qt.qpa.screen logging categoryShawn Rutledge2015-02-255-39/+66
| | | | | | | | | | | | | | | | | | | | | | Some existing debug output required recompiling with Q_XCB_DEBUG. Being able to enable this debugging in the field will help with troubleshooting any remaining screen management issues. Change-Id: Ie67b0009d4b00b0d39fde0fb4d8d54fcf89d6693 Reviewed-by: Sandro Mani <manisandro@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Ensure QGuiApplicationPrivate::screen_list is correctly populatedSandro Mani2015-02-253-21/+43
| | | | | | | | | | | | | | | | | | | | Ensure QGuiApplicationPrivate::screen_list always contains at least one screen, and that the first item (returned by QGuiApplication::primaryScreen) is always the current primary screen Task-number: QTBUG-42985 Change-Id: I08b880b3e94387f28230ed5fc738bceea943bad3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Have XCB/Windows platform integration classes keep their own instance pointerSandro Mani2015-02-258-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>