summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/services
Commit message (Collapse)AuthorAgeFilesLines
* XDG Portal: quick optimization to avoid dup/close of a file descriptorThiago Macieira2019-03-051-2/+2
| | | | | | | | Just gift it to QDBusUnixFileDescriptor. Change-Id: Ifa822ecdaaa241968ed7fffd158799041653cf78 Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* XDG Portal: allow the portal not to be runningThiago Macieira2019-03-051-16/+32
| | | | | | | | | For some reason, it may be missing with SNAP. Fixes: QTBUG-74112 Change-Id: Ifa822ecdaaa241968ed7fffd1587966cbd30dcbd Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-191-1/+3
|\ | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| * Modernize the "settings" featureLiang Qi2018-11-151-1/+3
| | | | | | | | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make flatpak portal support to be used also by Snap applicationsJan Grulich2018-09-021-12/+12
| | | | | | | | | | | | | | | | | | Snap now uses xdg-desktop-portal for portal support. Add check for apps running in Snap and make them use portals by default. We also should be using different name for the platform theme used by sandboxed apps. Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix unused parameter warningRobert Griebl2018-06-151-0/+2
| | | | | | | | | | | | Task-number: QTBUG-68804 Change-Id: Id40ea045237e5ceafc04d86629f2264eecc084c1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add support for opening files in OpenURI flatpak portalJan Grulich2018-04-131-0/+39
|/ | | | | | | | | | Adds support for opening files in applications outside sandbox. To prove we have access to given file, we have to pass it as file descriptor. The user then gets a dialog with list of application which can be used to open given file. Change-Id: Ifb4cf3dece15d0792b8eb1b90a240da2d3f3c89e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtServiceSupport: Remove redundant conditionGabriel de Dietrich2017-12-011-2/+1
| | | | | | | | | | | | | The condition for the 'services' sub-project in platformsupport.pro was identical to the one guarding genericunix.pri in services.pro. We can't remove the condition in platformsupport.pro because that would result on an empty static library, which is not supported on some platforms, like macOS. Change-Id: I5c80737d9527bdd75dde44e33e5063f3d7aeecb7 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add support for flatpak portalsJan Grulich2017-11-142-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for OpenURI and Email Flatpak portals. To support them we just do specific DBus calls, which are then caught and forwarded by xdg-desktop-portal daemon/service. This is needed for Qt applications running in sandbox, otherwise they cannot open links or email clients inside sandbox. Other portal support, like for opening files can be added into a platform theme, but adding support for OpenURI and Email portal requires writing custom platform services plugin and this is only possible when you write complete platform plugin, thus we want to have this support directly in Qt. Support for other portals will most likely follow soon, but at this moment we have to get rid of creating our custom platform plugin to just have our own platform services for flatpak support. [ChangeLog][Platform Specific Changes][Linux] Added support for flatpak portals. Flatpak is a software utility for software deployment and package management. It provides a sandbox environment in which users can run applications in isolation from the rest of the system. To communicate with the system flatpak uses portals, which are designed to be a bridge between sandboxed applications and desktop/system running on user's computer. Flatpak runs automatically this as service, called xdg-desktop-portal, which exports portals on DBus and which are by default visible to all applications running under Flatpak. Change-Id: Ice57ad120d30a3154b133172c79d8e9d6e61bd4c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-3/+3
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update detection of $DESKTOP_SESSIONThiago Macieira2017-04-271-4/+24
| | | | | | | | | | | | | I don't know how widespread this use is, but apparently sddm seems to set DESKTOP_SESSION to be the .desktop file that it used to launch the session (minus the .desktop extension). In that case, we should read the DesktopName entry from the file to get the actual desktop type. And since the desktop detection from QGenericUnixServices should suffice, we don't need to repeat the same code in QGenericUnixThemes. Change-Id: I0e1a09998253489388abfffd14b5eeefbd7fe740 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix warning for -no-feature-multiprocessTasuku Suzuki2017-04-251-0/+2
| | | | | | Change-Id: Ifa3382098c8f7c2cb1750b7ac5e583ddd71895e2 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Properly use the "process" featureUlf Hermann2017-02-271-2/+4
| | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Don't set platform specific QT_NO_FOO defines in qglobal.hLars Knoll2016-11-241-1/+2
| | | | | | | | | They should be enabled/disabled through the configuration system. Remove some unused defines, and move one define from qglobal.h to a proper feature definition in Qt Gui. Change-Id: Ie8d5bff9712ba745af60b42ceca3f0440bed2706 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* create modularized version of qtplatformsupport moduleOswald Buddenhagen2016-10-152-3/+13
| | | | | | | | | | 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>
* Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-081-2/+2
| | | | | | | | | | | | | | | Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * QtPlatformSupport: Remove virtual from declarations with override.Friedemann Kleint2016-01-211-2/+2
| | | | | | | | | | | | Change-Id: If94207596411680dfc2dbe33f298dc48fd5b7cc0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-152-28/+40
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove use of system() when QT_NO_MULTIPROCESS is defined.Rolland Dudemaine2015-12-041-0/+22
|/ | | | | | | | Some systems, like INTEGRITY, may support Posix/unix but lack system() in certain configurations. Change-Id: I8ef09fac03f8d16d791cdf1073f32b1c7c911776 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-2/+2
| | | | | | | | | | | 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>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-131-1/+1
| | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-112-14/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-3/+3
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-091-1/+1
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-242-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add missing private headers warningSamuel Gaist2014-09-041-0/+11
| | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve desktop environment detection.David Faure2013-04-241-9/+17
| | | | | | | | | | | | | | | UNKNOWN now means generic unix theme, rather than Gtk: there are other KDE/Qt-based desktops, and there's also the case of no desktop at all (e.g. bare Xvfb, as used by automated builds). To make this correct for GTK-based desktops, this commits improves the detection of the current desktop environment. Change-Id: Ib696624de39d5024527880df7adc26c65b838d15 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-182-2/+2
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Detect Unity by checking XDG_CURRENT_DESKTOP and use Gnome theme.Friedemann Kleint2012-11-201-0/+4
| | | | | | | | | | Fallback to Gtk for unknown desktops, which should be suitable for most cases like XFCE. Task-number: QTCREATORBUG-8254 Change-Id: Iaf9959f75852e03a83b5af7d0dead01ef657d678 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-48/+48
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtGui: use new qEnvironmentVariableIsEmpty()Marc Mutz2012-08-141-2/+2
| | | | | | | | In particular, static bool showRasterOverlay is safer. Change-Id: I9df6c9a9a56d2e61b13391b6889c0ac6e259e801 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove widgets lib dependency on platformsupport.Frederik Gladhorn2012-06-082-20/+10
| | | | | | | | Instead of the dependency add the one needed function as virtual to the QPlatformServices in QtGui. Change-Id: Ia4455f5ac88ec4d0480bd81635cebba62bbd8ac5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add palette() and further hints to QtGui/QPlatformTheme.Friedemann Kleint2012-02-172-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Add QPlatformServices class.Friedemann Kleint2012-02-104-0/+232
- 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>