summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* make use of QT_REQUIRE_CONFIG() in platformsupport modulesOswald Buddenhagen2016-10-1512-29/+28
| | | | | Change-Id: I26fbe75c65c10d68454e64e306f7155367e66cf6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* rely on transitive library dependencies for freetype/fontconfigOswald Buddenhagen2016-10-154-4/+3
| | | | | | | | | | | | | | so far, we have been delaying the linking, because we didn't want to make the monolithic platformsupport module pull in spurious dependencies. however, now that the module was split, there is no need to play such games any more. a nice effect of this is that the hideous qpa/*unixfontdatabase.prf files disappear, and finally freetype_dependency.pri also becomes trivial and is thus inlined. Change-Id: I255376d592625542310a31222eb6ac965943df99 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* create modularized version of qtplatformsupport moduleOswald Buddenhagen2016-10-1543-201/+446
| | | | | | | | | | lumping together all kinds of unrelated stuff has caused problems with spurious dependencies from the beginning. as the modularization infra is now in a state which supports many small private libraries just fine, take advantage of it. Change-Id: Ic40f47ce76a308bbfd32deae281f6f064fe1ef4c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* get rid of Q_FONTCONFIGDATABASE defineOswald Buddenhagen2016-10-151-2/+2
| | | | | | | | use fontconfig feature directly instead. easier to understand data flow, and less noisy compiler command lines. Change-Id: If80af4b08933049d553df685b41422d15e1e4f5c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix build with various features disabledLars Knoll2016-10-111-0/+10
| | | | | Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-113-8/+16
|\ | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap.cpp src/widgets/kernel/qformlayout.cpp Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-083-8/+16
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
| | * dbustray: Support replacing menu on QDBusTrayIconDmitry Shachnev2016-10-073-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a new menu is set via the updateMenu() method, properly unregister the old menu and register the new one. Task-number: QTBUG-53676 Change-Id: I8c1ea2d171caec01488f0fe8a565bc9b2f7e431e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Migrate libinput support away from QT_LIBRARY_VERSIONLaszlo Agocs2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There may not be a version when libinput is not picked up via pkg-config. Add a config test instead. Task-number: QTBUG-56017 Change-Id: I421af4cef1b896413a4ebda561809a8b2a3386b3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | move dbusmenu and dbustray under themes/genericunixOswald Buddenhagen2016-10-0724-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | that's the only place where they are used, and this clarifies the structure. Change-Id: I874beb7f049b34cc73079609b8baabcc1bd3cd39 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Replace QCFString::to(CF/NS/Q)String usage with QString methodsTor Arne Vestbø2016-10-062-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Slims down QCFString and leaves only one implementation of converting back and forth between CF/NS strings and QStrings. Change-Id: I068568ffa25e6f4f6d6c99dcf47078b7a8e70e10 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | rely on module include paths for qpa includesOswald Buddenhagen2016-10-044-6/+6
| | | | | | | | | | | | | | | | | | Change-Id: I9a28a5ec9b0050786c4abc39c6ac298e95cf8fad Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | convert apparently forgotten QT_CONFIG/fontconfig reference to qtConfig()Oswald Buddenhagen2016-10-041-1/+1
| | | | | | | | | | | | | | | Change-Id: I69d7247747c6e5a7b29051ba7b86b29c27936e65 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | clean up freetype conditionalsOswald Buddenhagen2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | there is no point in testing !win32 explicitly any more, as configure will take this into account already. Change-Id: Idfca46feece6451509b405a4afc2b7205667c5bb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | fix freetype/fontconfig configure systemOswald Buddenhagen2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convert the ugly config.tests/[...]/freetype.pri file into a custom callback in configure.pri, and reinstate pkg-config use for freetype. subsequently, use QMAKE_USE for the actual library references. this fixes in particular cross-builds, as the new configure was not passing the necessary information to the test any more, so the old .pri file misbehaved. Task-number: QTBUG-54911 Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-291-1/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/uikit/xcodebuild.mk tests/auto/other/lancelot/tst_lancelot.cpp tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-231-1/+7
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp Change-Id: I9cc8f25ad897efab6a42cb5c5161b1c9402952f0
| | * Fix Myanmar text with some fontsEskil Abrahamsen Blomfeldt2016-09-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In change db2764db3466221ad680d63ff2224cdd016fc351, we introduced the requirement of having specific OpenType tables available to certain fonts. Before, we would not require OpenType support to use a font for Myanmar text, for instance, since this was not listed as one of the languages requiring OpenType support. This patch simply brings back the limitation that fonts are only disqualified by missing tables if the language is one of the ones we know to require OpenType. Change-Id: I6f1ee2c8a068f9e183a36e24967f331dae96c14b Task-number: QTBUG-55569 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Pick up changes to device-pixel-ratio in QRasterBackingStoreTor Arne Vestbø2016-09-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression from 2d2d9078, which assumed the code in QBackingStore::beginPaint would apply to macOS as well, but QHighDpiScaling::isActive() is only active when Qt does the high DPI scaling, so we never hit the resize() code-path. Adds backingStore() accessor to go from QPlatformBackingStore to QBackingStore. Change-Id: I5de2ade74e731df445ea22e0f49b2a121e678efe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | xcb: Support EGLStreams for Wayland on X11Paul Olav Tvete2016-09-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | To make NVidia EGLStreams work on the desktop, we need to use eglGetPlatformDisplayEXT instead of eglGetDisplay. Therefore, let's try that first if we have the extension. Change-Id: Id420fb46d5bc5345faa5cbb066584b0859d50417 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | eglfs: Add missing virtual layout setting for DRM/KMSLaszlo Agocs2016-09-223-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just setting virtualDesktopLayout and virtualIndex are not always enough. To create more complex shapes (e.g. a T-shaped cluster) the top-left position has to be specified explicitly. Enable this via an optional virtualPos property. This also involves improving evdevtouch's mapping functionality. Instead of fragile indices, rely on the screen name instead. Change-Id: I138840779032ad9da674bfef7763adfdfc74ccd4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-222-18/+33
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-212-18/+33
| |\| | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | * QEvdevKeyboardHandler: use RAII in create()/ctorMarc Mutz2016-09-182-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity somewhat rightfully complained that the FD may be leaked in certain cases, e.g. when the new-expression throws. Yes, the plugin is compiled with exceptions disabled, but the code is still a bug waiting to happen, because it's too easy to just add an early return to the function and leak the FD that way. Fix by writing a small RAII class for FDs (can't use QSharedPointer, since it's not a pointer we're dealing with). It's quite generically named, in anticipation that it might come in handy elsewhere, too. Coverity-Id: 89046 Change-Id: I83d1ed3f11219065d2248c129ed191a651f617c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-212-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971b88e is not needed in new configure. This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with apple SDK", 2c9d15d7, because it breaks iOS build with new configure system. Conflicts: mkspecs/features/default_pre.prf mkspecs/features/mac/toolchain.prf mkspecs/features/toolchain.prf src/dbus/qdbusconnection.cpp src/plugins/sqldrivers/mysql/qsql_mysql.cpp src/sql/drivers/mysql/qsql_mysql.cpp src/widgets/widgets/qmenubar.cpp src/widgets/widgets/qmenubar_p.h tools/configure/configureapp.cpp tools/configure/environment.cpp tools/configure/environment.h Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-162-0/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
| | * dbusmenu: Don’t leave dangling pointers when menus are destroyedDmitry Shachnev2016-09-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete references from menu to its containing item, and vice versa. Fixes https://launchpad.net/bugs/1620937 Task-number: QTBUG-55966 Change-Id: I58f0f0a90184bee4b0466c28d91c670a34fa65a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * dbustray: Delete m_notifier in QDBusTrayIcon::cleanup()Dmitry Shachnev2016-09-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where notificationClosed() and actionInvoked() slots were called more than once, from previous alive notifier instances. Change-Id: I4cb4dfc27ee129bc5282fbd8e0961959d0765112 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Save temp icon in higher resolution on HiDPI screensVictor Kropp2016-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | In case temporary system tray icon is saved to /tmp, scale it according to current devicePixelRatio() instead of using hardcoded 22x22. Change-Id: I2adf2151da3241f4600f8645e323346daabcec4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | macOS: Implement QCocoaBackingStore in terms of QRasterBackingStoreTor Arne Vestbø2016-09-183-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous detection of device pixel ratio changes in paintDevice() is not needed, as QBackingStore::beginPaint() already does this check and calls resize(). Change-Id: I9ee8410fa3a5404c5ec19d2cba4543a9e3359fe9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Use QString::fromLatin1() less to avoid string allocationsAnton Kudryavtsev2016-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString::fromLatin1 always allocates memory, but there are cases where we can avoid/reduce allocations or/and reduce text size, e.g.: QStringBuilder expressions Fix: replace QString::fromLatin1 with QL1S QString::fromLatin1().arg(String) pattern Fix: replace with QStringBuilder Overloaded functions with QL1S arg Fix: replace QString::fromLatin1 with QL1S In rare cases if there is no overloaded function with QL1S and we have deal with string literal, replace QString::fromLatin1 with QStringLiteral. Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Use QStringBuilder more to optimize memory allocationsAnton Kudryavtsev2016-09-151-2/+1
| | | | | | | | | | | | | | | Change-Id: I2939ffa10496fdc59e0402a9cb54458565ccd657 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Modularize configure.json/.priLars Knoll2016-09-152-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-051-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-051-1/+4
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/testlib/selftests/generate_expected_output.py Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
| | * Cocoa: Add support for triple-buffered GL contextsTor Arne Vestbø2016-08-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, the requested format may not be available, so clients should check the actual format to confirm triple-buffering. Change-Id: Icf073cc9ddf2c912eb5c3ce0ac80d1694d1c56d7 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Do not force the default fontconfig configurationAllan Sandfeld Jensen2016-09-042-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since 74cade1ee42dbe15d3242b08d5880e08e6294e2e, QFontconfigDatabase has forced a full init to the default configuration breaking applications that set a custom fontconfig. Change-Id: If9ee3e185c42af10c05ae3852d088881da1d4f1a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QtPlatformSupport: Restrict usage of DBus for menu/tray icons to UnixFriedemann Kleint2016-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise, there is a needless dependency on DBus on Windows. Change-Id: I6ef9ec41a74c2f864dddf78abede205493eae5b3 Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | platformsupport: eradicate some easy Q_FOREACH loopsMarc Mutz2016-08-2610-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All loops trivially not modifying the iterated-over container. Saves ~9.4KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I2d91da1f78d9b33d4c5e4a1627560d8e705a9b9a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | dbusmenu: eradicate Q_FOREACH loopsMarc Mutz2016-08-263-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. Saves ~1.7KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I492bf2d6afe9bccdc1237003388fcb83a2261dba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | fix build with various QT_NO_* definesNick Shaforostoff2016-08-268-4/+19
| | | | | | | | | | | | | | | | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge dev into 5.8Oswald Buddenhagen2016-08-2236-128/+458
|\ \ \ | | | | | | | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * | | Add support for Apple watchOSJake Petroules2016-08-193-15/+14
| | | | | | | | | | | | | | | | | | | | Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | | Cleanup QT_NO_FONTCONFIG usageLars Knoll2016-08-192-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop messing around with the define in pro files, and rely on the configuration system. Disable fontconfig on Mac, which in practice gives the same result as before. Change-Id: Iea3aec127af96f221f4ee8682fb20a624332b82f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | Use qtConfig throughout in qtbaseLars Knoll2016-08-1916-32/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | Rework privateFeatureLars Knoll2016-08-193-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | privateFeature would add QT_NO_FEATURE to the DEFINES in the private .pri file, which was somewhat inelegant. Additionally, it would add the feature to the _public_ QT_CONFIG variable, which was plain wrong. Replace the implementation with the one just introduced for publicFeature, with the difference that the features are written to the private files instead. As this entirely disposes of the old system, all usages in the project files need to be replaced atomically as well. Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | Improve library version handlingLars Knoll2016-08-192-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output the version as a define into the private config header as a define using a hex number. Like that we can easily do version checks on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK() macros. Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | employ QMAKE_USE: LIBS += -lfooOswald Buddenhagen2016-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOOOswald Buddenhagen2016-08-197-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this migrates the cases where the build system already made (some) use of variables (possibly) set by configure. Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-168-12/+131
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288