View Revision
markg accepted this revision.
markg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS
View Inlinestatusnotifieritemsource.cpp:393-399
if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
uint *uintBuf = (uint *) image.data.data();
for (uint i = 0; i < image.data.size()/sizeof(uint); ++i) {
*uintBuf = ntohl(*uintBuf);
++uintBuf;
}
}

Unrelated to your commit, i know.

Is there a reason why this is done at runtime?

#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
// convert.. with qFromLittleEndian for instance
#endif

Just curious.


View Inlinestatusnotifieritemsource.cpp:409
QImage iconImage((const uchar*)dataRef->data(), image.width, image.height, QImage::Format_ARGB32,
[](void* ptr) {

Very smart! I didn't even know that was possible.
The cast should change to a C++ style cast though.


REPOSITORY
R120 Plasma Workspace

BRANCH
master

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

To: davidedmundson, Plasma, markg
Cc: markg, plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas