D13745: Implement support for virtual desktops on Wayland

Vlad Zagorodniy noreply at phabricator.kde.org
Tue Jul 3 20:12:23 BST 2018


zzag added inline comments.

INLINE COMMENTS

> taskfilterproxymodel.h:73
>       * @see setVirtualDesktop
>       * @returns the number of the virtual desktop used in filtering.
>       **/

Is it id or number?

> virtualdesktopinfo.cpp:126
>  {
> -    return KWindowSystem::numberOfDesktops();
> +    QVariantList ids;
> +

ids.reserve(KWindowSystem::numberOfDesktops());

> virtualdesktopinfo.cpp:304
> +
> +    foreach (const QString &id, virtualDesktops) {
> +        ids << id;

Call reserve method. Also, why not range based for loop?

> waylandtasksmodel.cpp:760
> +    QByteArray data(mimeData->data(Private::groupMimeType()));
> +    if ((unsigned int)data.size() < sizeof(int) + sizeof(quint32)) {
> +        return ids;

How about `static_cast<size_t>(data.size())`?

REPOSITORY
  R120 Plasma Workspace

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

To: hein, mart, mvourlakos
Cc: zzag, ngraham, abetts, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180703/d67bc1f2/attachment-0001.html>


More information about the Plasma-devel mailing list