summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/themes
Commit message (Collapse)AuthorAgeFilesLines
* Use "monospace" as fallback system FixedFont in KDE theme; loggingShawn Rutledge2019-05-071-3/+9
| | | | | | | | | | | | | | | Also de-duplicate the "monospace" string in qgenericunixthemes.cpp, and add tst_QFontDatabase::systemFixedFont() to verify that QFontDatabase::systemFont(QFontDatabase::FixedFont) really returns a monospace font across platforms. Replace commented-out qDebug()s with qt.text.font.match and qt.text.font.db logging categories to troubleshoot when the test fails (among other uses). Add qt.qpa.fonts logging category to unix themes to show default system and fixed fonts (font engines on other platforms are already using this category). Fixes: QTBUG-54623 Change-Id: I2aa62b8c783d9ddb591a5e06e8df85c4af5bcb0c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* fix compilation with various -no-feature-* optionsNick Shaforostov2019-05-051-0/+2
| | | | | Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Modernize the "settings" featureLiang Qi2018-11-152-6/+8
| | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Modernize the "mimetype" featureLiang Qi2018-10-121-0/+2
| | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QDBusTrayIcon: Avoid needless initialization of a global varAlexander Volkov2018-06-221-2/+7
| | | | | | | | | | | TempFileTemplate is initialized each time an application starts. It leads to the call of QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) which is slow and can even change permissions of the runtime directory. Use a static wrapper function to initialize this variable only when needed. Change-Id: Ib620f9b842c88103c67f8dfab200f4d39c9981ee Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add support for building QtWayland on macOSRobert Griebl2018-06-091-1/+1
| | | | | | Change-Id: Ibed63a01abf32e10a31c610996ae93d3bd9ce153 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* dbustray: add NewMenu signal and emit it when menu changedMarco Trevisan (Treviño)2018-02-222-0/+4
| | | | | | | | | | | | | | | | | This is a signal that is not actually supported by the StatusNotificationIcon standard, but it comes to be important for the Qt implementation of it, in fact qt apps might not have a menu, when exporting the Menu path as /NO_DBUSMENU or they could add this later in the execution. So, currently there's no way for the StatusNotificationWatcher to know when a menu has been added (or changed). Adding a NewMenu signal won't cause any troubles, but will allow watchers to be notified properly on menu addition. Change-Id: I9a8b00213f5023950811af1d62cd91bc51744b78 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Introduce QIcon::fallbackSearchPaths()Alexander Volkov2018-01-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... that will be used if an icon can't be found in the current theme. The Icon Theme Specification https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html states that unthemed icons must be searched in the base directories, i.e. /usr/share/icons, ... But in practice unthemed icons are installed into /usr/share/pixmaps and this dir is not used as a base dir for icon themes. So it's better to explicitly specify fallback dirs to avoid needless access to the filesystem. Also some KDE application install their own unthemed icons (into /usr/share/<appname>/pics), that can't be found by QIconLoader. With this change it would be possible for them to specify dirs with unthemed icons and thus be displayed correctly in non-KDE environments. [ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that will be used to find icons missing in the current icon theme. Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e Task-number: QTBUG-33123 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* macx-clang: Opt-in xcb QPA support with XQuartzGabriel de Dietrich2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable xcb QPA plugin when XQuartz is available. This is done in a single build, alongside the Cocoa version. We delegate part of the configuration stage to pkg-config, so this becomes a requirement. Ensure that PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig is in your environment, or pkg-config is properly set up. Tested with the following configure options: configure \ -pkg-config \ -fontconfig -system-freetype \ -system-xcb -xkb -no-opengl \ -qt-xkbcommon -qt-xkbcommon-x11 Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-3/+5
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-231-3/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | * Generic Unix Theme: Don't crash if D-Bus is not runningGabriel de Dietrich2017-11-201-3/+5
| | | | | | | | | | | | | | | | | | Change-Id: I215ef25fe943730ba8b1976695a04a4aa86638f1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-194-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-194-62/+62
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-9/+40
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Read more KDE configuration in the KDE platform themeAllan Sandfeld Jensen2017-07-181-9/+40
| | | | | | | | | | | | | | | | | | | | Adds the hints that are read and used by the plasma-integration platform theme, so naked Qt applications can integrate just as well on this front. Change-Id: I45a113e0081ea96c8cf543c22b28b69280ae7619 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Follow KDE settings for menu and toolbar fontsAllan Sandfeld Jensen2017-06-131-0/+8
| | | | | | | | | | | | | | | | Makes pure Qt applications integrate better when those fonts don't match the general fonts. Change-Id: Ic06e8595efc44f0c6649cf364e751c4c714cda93 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-074-10/+8
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * Update detection of $DESKTOP_SESSIONThiago Macieira2017-04-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 unused private fields in dbusmenu and dbustrayThiago Macieira2017-04-263-7/+3
| | | | | | | | | | | | | | | | | | qdbusplatformmenu_p.h:131:9: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] qdbusplatformmenu_p.h:192:10: error: private field 'm_isSeparator' is not used [-Werror,-Wunused-private-field] etc. Change-Id: I84e363d735b443cb9beefffd14b8bc4253081145 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Disable precompiled headers for small modulesThiago Macieira2017-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Creating a precompiled header exclusively for a one- or two-file module is wasteful. The time that it takes to build the precompiled source is on the same order as a regular compilation, so enabling precompiled headers for those modules just makes the build slower. Also make it possible to override the precompiled header by just setting PRECOMPILED_HEADER to empty. Change-Id: I0e1a09998253489388abfffd14b5f221288c4826 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make platform menu tag/setTag not be pure virtualAlbert Astals Cid2017-04-182-30/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: * Tag means nothing to the platform, tag is something the Qt side code will store and then restore, but it's meaningless for the platform, since it can be either the pointer to an action (qmenu.cpp) or an item count (qcombobox.cpp) * Since it's meaningless to the platform you don't know what to do when trying to implement a platform, this shows in how the field was being initialized, some initialized to this, some initialized to 0 On a followup commit we will remove the virtual tag but first need to fix up other QPAs that don't live in the main repo Change-Id: I15ac83f3bf7e4c741153d31ac761dbbe6f4b1b52 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | cleanup: remove references to unknown classesGatis Paeglis2017-04-081-8/+0
|/ | | | | | | | Google did not find anything. I guess it is just some development side product. Change-Id: Idc44870e71bad1c13858210c7830e08573442cca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix warnings for -no-feature-mimetypeNikita Krupenko2017-03-291-0/+2
| | | | | | Change-Id: I6b1239941f8fd13eec72b0874d15d821d717ddf3 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-281-1/+1
|\ | | | | | | Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
| * Make sure QDBusMenuBar is restored when the window is hidden and shownDmitry Shachnev2017-03-271-1/+1
| | | | | | | | | | | | Task-number: QTBUG-58723 Change-Id: Ib4c3dac8a8cce717f4d47ab619c05b9e1719f311 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Enable QStyleHints::useHoverEffects for KDE and other unix systemsNikita Krupenko2017-03-071-0/+4
| | | | | | | | | | | | | | | | By default, it enabled only for Gnome Task-number: QTBUG-59298 Change-Id: Ib44f52b3175ed1904f24ec9e21f00ea3f3334287 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix build for -no-feature-systemtrayiconStephan Binner2017-02-272-1/+6
|/ | | | | Change-Id: If85cf995c5eefa2c4d648c9ad4b02922a13f682a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDBusTrayIcon: try use runtime or cache for iconsMarco Trevisan (Treviño)2017-02-061-1/+24
| | | | | | | | | | | | It's better to save icons in $XDG_RUNTIME_DIR or $XDG_CACHE_HOME paths than in $TMPDIR as these places are readable from the desktop environment when an app is ran confined in a sandbox (as in snap packages) Change-Id: I1a3e4c5714f8ea51034d18fb87cead87ed21d6be Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* QDBusTrayIcon: always save the temp icon in UnityMarco Trevisan (Treviño)2017-01-191-0/+6
| | | | | | | | | | We enforce the check of saving the icon when the indicator process name isn't available (as we might be running in a confined world), but we're running in Unity. Change-Id: I80d3be1a8c6eba8c391364260746e78cf89a5b98 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* dbusmenu: Map showPopup method to ItemActivationRequested signalDmitry Shachnev2017-01-193-7/+18
| | | | | | | | This way the Qt accelerator shortcuts (i.e. Alt+F for the File menu) will cause the matching menu to be opened on the server side. Change-Id: I02a5b3c20c6eae130d0f133b33c9e247cff38d44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* dbustray: Handle StatusNotifierWatcher appearing and disappearingDmitry Shachnev2016-12-024-3/+20
| | | | | | | | | | | | | If the StatusNotifierWatcher disappears and then appears again, we need to register our tray icon again with it. To do this, split the “register with watcher” part into a separate method, and call it when m_dbusWatcher emits its serviceRegistered() signal. Change-Id: Id5fc8ac81b5038a61b678514dabd3eb9c8f1c106 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* make use of QT_REQUIRE_CONFIG() in platformsupport modulesOswald Buddenhagen2016-10-153-8/+8
| | | | | Change-Id: I26fbe75c65c10d68454e64e306f7155367e66cf6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* create modularized version of qtplatformsupport moduleOswald Buddenhagen2016-10-153-13/+22
| | | | | | | | | | 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>
* 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
* | move dbusmenu and dbustray under themes/genericunixOswald Buddenhagen2016-10-0723-0/+3434
| | | | | | | | | | | | | | | | 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>
* | Use QStringBuilder more to optimize memory allocationsAnton Kudryavtsev2016-09-151-2/+1
| | | | | | | | | | Change-Id: I2939ffa10496fdc59e0402a9cb54458565ccd657 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | platformsupport: eradicate some easy Q_FOREACH loopsMarc Mutz2016-08-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QtPlatformSupport: Add QAbstractFileIconEngineFriedemann Kleint2016-08-053-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code from QtWidgets/QFileIconEngine into a new class with virtuals in QtPlatformSupport so that platforms can reuse it. Prototypically use the class in the Windows and macOS QPA plugins. Remove QPlatformTheme::fileIconPixmap() and change the type of the hint QPlatformTheme::IconPixmapSizes from QList<int> to QList<QSize> so that it fits better with the icon code. Change-Id: I580e936f3507218757565ca099272cd575b3a779 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add XDG file icon support for UNIX themesFriedemann Kleint2016-08-042-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | Add helper class XdgFileIconHelper using the icon theme engine to implement QPlatformTheme::fileIconPixmap(). [ChangeLog][QtPlatformSupport] KDE/Gnome themes now implement QPlatformTheme::fileIconPixmap(), showing file icons. Change-Id: I32a948ece08305053ebadb3ace6cbc6fbd339946 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devEdward Welbourne2016-07-221-7/+7
|\|
| * Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add QStyleHints::useHoverEffectsJ-P Nurmi2016-07-201-0/+2
|/ | | | | | | | | | | | | The delivery of hover events creates unnecessary overhead on touch platforms. This allows Qt Quick Controls 2 to determine whether the underlying platform wants hover effects. The hover effects are enabled by default for the classic desktop platforms: Linux, Windows & macOS. Change-Id: Ia4e7b5c0fcb7af8f1c47e06fb28086cffdf35976 Task-number: QTBUG-50003 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* OpenGL, PlatformSupport: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-071-3/+4
| | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: Ib94d29b6ecec1cdab2604d0277a743e8b340be5e Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add createMenu() method to QPlatformMenuBarDmitry Shachnev2016-03-212-24/+0
| | | | | | | | | | | | | | | | | | | | The D-Bus platform menus are only useful inside menu bars and system tray icons, and should not be created for other cases (like the context menus). This adds a new virtual createMenu() method to QPlatformMenuBar class, analogous to the already existing QPlatformSystemTrayIcon::createMenu() method, and adds support for it to QMenuBar. The D-Bus platform menus are now created from QDBusMenuBar class. As an additional benefit, we no longer have to check whether the AppMenu Registrar service is present for every created menu, and check it only once (this should speed things a bit up). Change-Id: Ic7d94e58a501ab9d2954aeb342ebd46ef8e62d49 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>