[Differential] [Changed Subscribers] D2756: Cache system tray applet information

broulik (Kai Uwe Broulik) noreply at phabricator.kde.org
Tue Sep 13 08:19:17 UTC 2016


broulik added inline comments.

INLINE COMMENTS

> systemtray.cpp:386
>      QMap<QString, KPluginInfo> sortedApplets;
> -    foreach (const KPluginInfo &info, applets) {
> -        const QString dbusactivation = info.property(QStringLiteral("X-Plasma-DBusActivationService")).toString();
> -        if (!dbusactivation.isEmpty()) {
> -            qCDebug(SYSTEM_TRAY) << "ST Found DBus-able Applet: " << info.pluginName() << dbusactivation;
> -            m_dbusActivatableTasks[info.pluginName()] = dbusactivation;
> -            continue;
> -        }
> -
> -        if (m_allowedPlasmoids.contains(info.pluginName()) &&
> +    foreach (const KPluginInfo &info, m_systrayApplets.values()) {
> +        if (m_allowedPlasmoids.contains(info.pluginName()) && !

Don't iterate over values(), you're creating a temporary QList just to iterate over it:

  for (auto it = m_systrayApplets.constBegin(); end = m_systrayAppltes.constEnd(); it != end; ++it) {
      const KPluginInfo &info = it.value();
      ...
  }

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D2756

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: davidedmundson, #plasma
Cc: broulik, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160913/f8ef5f43/attachment.html>


More information about the Plasma-devel mailing list