--be6f670b2f154aa2844475df59670f8a Content-Type: text/plain; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit markg accepted this revision. markg added inline comments. This revision is now accepted and ready to land. INLINE COMMENTS > statusnotifieritemsource.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. > statusnotifieritemsource.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 --be6f670b2f154aa2844475df59670f8a Content-Type: text/html; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable View Revision=
markg accepted this revision.
markg added in= line comments.
This revision is now accepted and ready to land.

INLINE COMMENTS
if (QSysInfo::= ByteOrder =3D=3D QSysInfo::LittleEndian) {
uint *ui= ntBuf =3D (<= /span>uint *= ) image= .data.data();
for (uin= t i =3D 0; i < image.data<= span class=3D"p">.size()<= /span>/sizeof(uint); ++i) {
*uintBuf =3D ntohl(*uintBu= f);
++uintBuf;
}
= }

Unrelated to your commit, i know.

Is there a reason why this is done at= runtime?

#if Q_BYTE_ORDER =3D=3D 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<= /span>, 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 Worksp= ace

BRANCH
master

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

To: davidedmundson, P= lasma, markg
Cc: markg, plasma-devel, spstarr, progwo= lff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
--be6f670b2f154aa2844475df59670f8a--