summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* Add further theme hints to QPlatformTheme.Friedemann Kleint2012-02-221-1/+18
| | | | | | | | | | | | | | | | - Add hints for QDialog/QDialogButtonBox. - Add hint for available popup-menu area. - Add keyboard scheme hint replacing QGuiApplicationPrivate::currentKeyPlatform() Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Task-number: QTBUG-24315 Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use new plugin system for Input Context plugins.Friedemann Kleint2012-02-211-1/+1
| | | | | Change-Id: Ifd1f63499afba546a745815762263a58ebf66460 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add palette() and further hints to QtGui/QPlatformTheme.Friedemann Kleint2012-02-177-6/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | - Move palette() from deprecated QtWidgets/QGuiPlatformPlugin to QtGui/QPlatformTheme, Make it return a const * since QPalette does not have isNull(). - Initialize QGuiApplication::palette() and QApplication::systemPalette() from it. - Do not initialize QPalette from QGuiApplication::palette() unless app_pal is non-null (default to Qt::black if it is 0). This avoids initialization order crashes/recursions in the QPA plugin. Streamline initialization function. - Remove styleName(), systemIconThemeName() and iconSearchPaths() from QGuiPlatformPlugin and re-add them as QPlatformTheme::themeHint(). - Remove styleHint() from QGuiPlatformPlugin, add it to QPlatformTheme::themeHint(). - Add UNIX themes with factory function (Generic, KDE, Gnome), taking it from Qt 4.8 code (stripping the KDE 3 code). - Implement Windows palettes. Task-number: QTBUG-24204 Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove historical +1 from font height calculationEskil Abrahamsen Blomfeldt2012-02-171-3/+1
| | | | | | | | | | | Historically, we've calculated font height as ascent+descent+1. In Qt 4, a patch was added to work around this by subtracting 1 from the descent of the font engines. We now remove the +1 and the work arounds. Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid loading and keeping unused fallback font enginesEskil Abrahamsen Blomfeldt2012-02-175-4/+161
| | | | | | | | | | | | | | | | | | | | | | | | | When we request glyphs from fallback fonts, we would potentially load all fonts on the system into memory. This is especially true for glyphs that are not supported by any font (or by the last in the list) in any "Common" script (which e.g. includes CJK). This would make any application which tried to display unsupported glyphs use huge amounts of memory for keeping unused fonts cached, only limited by the number of fonts on the system. The patch contains two solutions: First, before loading the font, the multi font engine will be asked whether it needs to be tried for the given character. By default, this will always be true, so all fonts will be tried, but with the new font config multi engine in the platform plugin, it will ask FontConfig whether the font contains a glyph for the character. Should the font be loaded and still fail to resolve the character (which could be the case for other platforms), we will simply delete it again immediately instead keeping it cached. Change-Id: I92dfb39289a359f49caa02c2caf8baf66098fb59 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add QPlatformServices class.Friedemann Kleint2012-02-105-0/+233
| | | | | | | | | | | | | | | - Add QPlatformServices as back-end for QDesktopServices. - Bring back UNIX/Linux desktop detection in platformsupport as a generic implementation. - Add Windows implementation. Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org> Change-Id: If94bb65755df4f849edd83c57143ee2c73002137 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add support for "none" QT_IM_MODULEJan Arne Petersen2012-02-101-1/+4
| | | | | | | | Do not try to load any input method when QT_IM_MODULE is set to "none". Change-Id: I695cb76d616bb2ce5021979bae2790b2f286122d Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Properly read back the actual format in xcb and xlib plugins.Samuel Rødal2012-02-102-7/+12
| | | | | Change-Id: Iccef2c4a87863b93914b84edf3a6015dad5e512a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* More graceful handling of QSurfaceFormat::samples() with GLX.Samuel Rødal2012-02-101-1/+1
| | | | | | | | | | Earlier, if we asked for say 16 and the implementation only handled 4, we defaulted to 0 (no antialiasing). Now, we instead try a progressively lower number until we find a match. Task-number: QTBUG-22669 Change-Id: I3d89f2a302f9c6195e2d43827006fd015d981ce7 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* More graceful handling of QSurfaceFormat::samples() with EGL.Samuel Rødal2012-02-101-4/+10
| | | | | | | | | | Earlier, if we asked for say 16 and the implementation only handled 4, we defaulted to 0 (no antialiasing). Now, we instead try a progressively lower number until we find a match. Task-number: QTBUG-22669 Change-Id: I63f4b8aadf8e06713d19fdc9b9d73672162c816a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use qgetenv instead of getenv.Andreas Holzammer2012-02-081-1/+1
| | | | | | | | | Use the Qt Version because platforms like Windows CE don't support getenv. Change-Id: I95ca4d7194e09889ab228af80e679a3c34479e41 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reorganize evdev pluginsLaszlo Agocs2012-02-084-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | linuxinput becomes evdevmouse. The experimental touch code is removed, now the plugin's purpose is solely to generate mouse events from absolute and relative pointer events. The plugin key is EvdevMouse. touchscreen becomes evdevtouch. The plugin key is EvdevTouch. In case keyboard support appears some day, it will fit nicely in the system by the name of evdevkeyboard or similar. Some little udev code is moved to platformsupport so it can be shared between the plugins. This may be extended later if more sophisticated udev support is needed. N.B. the intention is to keep this as simple as possible. We are shipping these plug-ins as reference examples, not as full-featured drivers. evdev and udev support has configure time tests from now on. This means the "drivers" (generic plugins) will get built automatically when the support is available. Change-Id: Iaf6260b5c2edfb9f25d070d2764466725adc6b4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move QString <-> NSString conversion to QtCoreMorten Johan Sorvig2012-02-021-5/+2
| | | | | | | | | | | | | | | | Add (private) API to QCFString: static QString toQString(NSString *) static NSString *toNSString(const QString &) Add implementation to qcore_mac_objc.mm. Keep the mac_cpp since it's used for building qmake as well as bootstrapping. Replace usage of NSString conversion functions in the cocoa and corewlan plugin with QCFString. Change-Id: I9f34edd5231255aef9d8d6e9a60306174bb279b3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Revert "Put the generated <module>version.h into build tree"Bradley T. Hughes2012-02-011-1/+1
| | | | | | | | | After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component. This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8 Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Windows: Fix compilation with -qtnamespaceKai Koehne2012-01-312-1/+10
| | | | | Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix compilation with -qtnamespace setKai Koehne2012-01-312-1/+9
| | | | | | Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove Symbian specific code in platformsupport.Xizhi Zhu2012-01-301-1/+1
| | | | | Change-Id: I5f06f80ae47b2c9fcd93832c23a453a9193e6120 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3035-35/+35
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Put the generated <module>version.h into build treeLiang Qi2012-01-281-1/+1
| | | | | | | | | It was put in source tree before. Task-number: QTBUG-20439 Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fall back on glXChooseVisual() if glXChooseFBConfig() doesn't work.Samuel Rødal2012-01-271-9/+66
| | | | | | | | | | Some older drivers don't fully support glXChooseFBConfig(). As a bonus, fix some memory leaks here and there. Task-number: QTBUG-21880 Change-Id: Ie306dee27f616927a6aa55fd71601569b828afcc Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-252-2/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move glyphMargin() to QFontEngineJiang Jiang2012-01-242-7/+8
| | | | | | | | | | | | | glyphMargin() support for QTextureGlyphCache is implemented in respective font engines, thus this function is platform dependent. Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC, now we should move them into QFontEngine and its subclasses. So far only Windows font engines support it. FreeType and Core Text based font engines all ignore it. Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2335-35/+35
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added xrender as a dependency to build glxconvenience.Samuel Rødal2012-01-061-1/+1
| | | | | | | Prevents build errors when xrender is not present. Change-Id: Ib80d52109dd0bcd63ba865c5f6e143961f3c20e6 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0535-35/+35
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix rare crashes in fontconfig fontdb due to uninitialized variableSimon Hausmann2012-01-041-1/+1
| | | | | | | | | Initialize the out variable passed to FcPatternGetString to protect against the "failure" case. Otherwise the subsequent QString::fromUtf8 is called with an uninitialized pointer. Change-Id: I31b8b4c366f673609b26eca162334fd8bc9f25d2 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Link to X and Xrender libs in glxconvenienceJørgen Lind2011-12-231-0/+1
| | | | | Change-Id: I54b2704be678f2c3b9ab8d24d044977c9c01e98e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QEventDispatcherQPA to QUnixEventDispatcherQPA.Robin Burchell2011-12-154-18/+18
| | | | | | | | | This removes confusion when we add a Linux-specific QPA dispatcher, and is technically more accurate, as QEDQPA was not 'the' QPA event dispatcher in the first place. Change-Id: I2a41d425f284522ee76ef86782d5eb2bdd805120 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Cocoa: Add autorelease pools.Morten Johan Sørvig2011-12-121-2/+2
| | | | | | | | | | | | | A couple of cases where we call Cococa APIs without having an autorelease pool in place surfaced after removing the global autorelease pool in 1a218a7. (This happens when when Qt API is called before app.exec() has started the Cocoa event loop.) Add local autorelease pools to prevent memory leaks. Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Better handling of GLX / EGL errors.Samuel Rødal2011-12-072-6/+8
| | | | | | | | | | If context creation fails, try again without a shared context. Added QPlatformOpenGLContext::isSharing() and QPlatformOpenGLContext::isValid() to propagate whether the platform context was successfully created with or without sharing. Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove QCoreTextFontEngineMultiJiang Jiang2011-12-042-357/+0
| | | | | | | | It's not used anymore since we have switch to HarfBuzz on Mac. Change-Id: I68252fbe3021f54dacac5a901184c3f3e541a6b7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Enable subpixel rendering for raster on MacJiang Jiang2011-12-042-1/+11
| | | | | | Change-Id: I06e6465e03c17776974d361254abf5b750736080 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add QRawFont from data support to Mac font dbJiang Jiang2011-12-012-0/+24
| | | | | Change-Id: I02f1c4b35b9ed585e72aa4bad9b75d3c098f8e62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Set supporting writingSystem correctlyJiang Jiang2011-12-011-1/+2
| | | | | Change-Id: I963aa7b69a48441619c5885c443ae2620fcc4e57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Mac Core Text font database for QPAJiang Jiang2011-11-306-3/+1451
| | | | | | | | | | | | | | Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fixed compile of QtPlatformSupport with -qtnamespace.Rohan McGovern2011-11-172-0/+8
| | | | | | Change-Id: Iba411d35abe85ecf29a44d99113954a0561ae286 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Provide defaultFont with fontconfig dbJiang Jiang2011-11-152-2/+10
| | | | | | | | | | | So that it won't just return "Helvetica" that may not exist in target system. Providing it seems to fix QTBUG-21833 as well, thus we can remove the QEXPECT_FAIL statement in qlistview test. '_' appears to reach the minimum right bearing in some fonts. Task-number: QTBUG-21833 Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* QEventDispatcherQPA: processEvents should only be called onceOlivier Goffart2011-11-151-1/+0
| | | | | | | | | | | | | | This caused a "deadlock" in tst_qobject::moveToThread The problem was that QEventLoop::quit was called from the first prcessed event in that loop, put calling process event a second time deadlock because there is no more event to process (In practice, some event can come from the window manager or the inputs, but they may as well not come) Change-Id: Ia469110eb9c9de57669e80cf19e933f410e469a4 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Do not add QPF fonts to basic font dbJiang Jiang2011-11-151-1/+0
| | | | | | | | | | QPlatformFontDatabase::populateFontDatabase() routine uses a different usrPtr format which is not compatible with the one basic font db uses (FontFile *). We shouldn't mix them together. Task-number: QTBUG-22713 Change-Id: I239ea085e14261f6b9ba66b03710a590a44378f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix symbol fonts support with FT engineJiang Jiang2011-11-112-0/+6
| | | | | | | | | | | | It appears that the symbol_map we obtained with FreeType doesn't work for common symbol fonts like Wingdings, in previous X11 code we use the code path with normal charmap, to enable it we need to make sure QT_NO_FONTCONFIG is not defined. And since the FcCharset functions doesn't really operates on the font database, we can safely skip the mutex calls. Change-Id: I8c484de200be1d47c053b10be2c51d2273dcd359 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Restore subpixel rendering support with fontconfig and FreeTypeJiang Jiang2011-11-051-6/+33
| | | | | Change-Id: I45cf83374ba5a8b1ae88415950c1e5ab72991598 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Revert "Avoid fontconfig access in fontEngine creation"Jiang Jiang2011-11-042-25/+43
| | | | | | | | | | | This reverts commit 8dcb52df8e2e949232ccded9fad5a4f25ba6dda2. Turns out that hint style is retrieved from font match instead of pattern match, which shouldn't be retreived until font engine creation. Change-Id: I90e779a3823e6a6604cdadb52586fcd5e22c295b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Re-added hellogl_es and ES 1 support for QOpenGLContext.Samuel Rødal2011-10-313-4/+4
| | | | | Change-Id: I576cf3595cdeeefb4ed840bb3b2b7097b3609cc7 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Use freetype font engine on WindowsOlli Werwolff2011-10-106-21/+26
| | | | | | | | | | | | | | | As windows' fontdatabases also uses functionalities from qbasicunixfontdatabase it was renamed to qbasicfontdatabase. But instead of iterating over the font directories' files it uses system calls to obtain the list of fonts and uses registry values to find the according filenames to add. The native font engine was still kept. It can be activated by adding fontengine=native as platformargument. Change-Id: I7197bed5d18b8a33d4aa97ce91bfa1cd281b80ea Reviewed-on: http://codereview.qt-project.org/5839 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Sanity-Review: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add font family alias resolving to QPAJiang Jiang2011-10-052-0/+19
| | | | | | | | | | | By default it doesn't do anything special, but for fontconfig font db it will do some tricks to convert alias like serif to actualy font family names like Times. Change-Id: I73058d187a5422e6f93bc1b728cecdc0250d5e1e Reviewed-on: http://codereview.qt-project.org/5984 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix compilation on HarmattanSimon Hausmann2011-10-032-3/+3
| | | | | | | | | | | Improved fix from e327401743dba9112faca77fd764869709ae4367 to add the necessary includes in the header file, where the types are also needed. The same header file is also included from the xcb plugin. Change-Id: I52a891be1ecc67d49a088a4db698270a06db6b54 Reviewed-on: http://codereview.qt-project.org/5932 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix compilation on HarmattanSimon Hausmann2011-10-031-0/+3
| | | | | | | | | Include X11 headers to get VisualID and other "types". Change-Id: Idbb323329d346726b98312b1e02c9b199f2b7a65 Reviewed-on: http://codereview.qt-project.org/5928 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-282-1/+26
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Respect the QSurfaceFormat when constructing a QOpenGLContext on MacGunnar Sletta2011-09-272-13/+24
| | | | | | | Change-Id: I1a17d2e7e060d9931d84afeb0fd42bc3b1f44e5d Reviewed-on: http://codereview.qt-project.org/5527 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Support adding application fonts with QFontconfigDatabaseJiang Jiang2011-09-233-5/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabaseQPA should be able to reinitialize database and reregister all the fonts when an application font is added, because it will trigger db->invalidate(). Add cloneWithSize support to QFontEngineBox so that even no usable font is found in QFontDatabase, QRawFont::setPixelSize can still work (without making the result rawfont invalid). Register application fonts with QFontconfigDatabase, the code is adapted from QFontDatabaseX11. Reenable QRawFont tests for QPA, these usages are now supported in QPA. Fix QStaticText tests, raster in QPA does support transformations. Translate the text before ZAxix rotation so that it will be visible in canvas. Add back fixedPitch support to QPA, and fix QFontDatabase tests. Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap locking. Fix QFontMetrics tests. Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977, QTBUG-20976, QTBUG-20760, QTBUG-20759 Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b Reviewed-on: http://codereview.qt-project.org/5384 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>