[Differential] [Commented On] D3292: Revamp Wayland application identification; align Wayland and X11 models
graesslin (Martin Gräßlin)
noreply at phabricator.kde.org
Mon Nov 7 14:19:35 UTC 2016
graesslin added inline comments.
INLINE COMMENTS
> waylandtasksmodel.cpp:233-241
> + if (!appDataCache.contains(window)) {
> + const AppData &data = appDataFromAppId(window->appId());
> +
> + appDataCache.insert(window, data);
> +
> + return data;
> + }
here you are iterating twice over the cache: once for the contains, once for the value.
Maybe do something like:
auto it = appDataCache.constFind(window);
if (it != addDataCache.end()) {
return *it;
}
const AppData &data = appDataFromAppId(window->appId());
appDataCache.insert(window, data);
return data;
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D3292
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: hein, #plasma, graesslin, broulik
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161107/29e38c1c/attachment-0001.html>
More information about the Plasma-devel
mailing list