fvogt added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in client.cpp:1428
> QByteArray has a move constructor, it's not copy.

That does not matter in this instance. 
`QString::fromUtf8(QByteArray(reply.name, reply.name_len));` does two copies:

- QByteArray copies name_len bytes from name into a heap-allocated buffer
- QString converts the UTF8 data inside QByteArray into UTF-16, allocated on 
the heap

The first copy is unnecessary.

REPOSITORY
  R108 KWin

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

To: graesslin, #kwin, #plasma
Cc: anthonyfieroni, fvogt, broulik, plasma-devel, kwin, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, 
lukas

Reply via email to