D28062: Fix compiler warnings
Vlad Zahorodnii
noreply at phabricator.kde.org
Mon Mar 16 07:32:38 GMT 2020
zzag added inline comments.
INLINE COMMENTS
> debug_console.cpp:713
> switch (value.type()) {
> - case QMetaType::QPoint: {
> + case QVariant::Point: {
> const QPoint p = value.toPoint();
According to Qt documentation, we should interpret QVariant::Type as QMetaType::Type.
> Although this function is declared as returning QVariant::Type, the return value should be interpreted as QMetaType::Type
https://doc.qt.io/qt-5/qvariant.html#type
> screenshot.cpp:661
> // OpenGL gives RGBA; Qt wants ARGB
> - uint *p = (uint*)img.bits();
> + uint *p = reinterpret_cast<uint*>(img.bits());
> uint *end = p + w * h;
Do compilers bark about using c-style casts?
> main_wayland.cpp:266
> + p->startDetached();
> + p->deleteLater();
> }
Indentation is off.
> aurorae.cpp:599
> {
> - return client().data();
> + return client().toStrongRef().data();
> }
Unrelated side note: this is really wrong!
> wayland_server.cpp:734
> {
> - auto ids = m_clientIds.values().toSet();
> quint16 id = 1;
Unrelated side note: I don't get why Qt folks deprecated toSet(). Range-based initialization looks very clunky if you ask me.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D28062
To: apol, #kwin
Cc: zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200316/a68dd598/attachment-0001.html>
More information about the kwin
mailing list