Remove ifdef round qCDebugs
ClosedPublic

Authored by davidedmundson on Mar 6 2017, 6:12 PM.

Details

Summary

It's not needed wtih Qt category logging.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Mar 6 2017, 6:12 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 6 2017, 6:12 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin requested changes to this revision.Mar 6 2017, 7:15 PM
graesslin added a subscriber: graesslin.

The ifdefs are from kde4 times. There it was also not needed, but nevertheless there. When working on the qt5 port I kept that under the assumption that the previous maintainer had a good reason for ifdefing it. Looking at the code I doubt it is side effect free. E.g. lines 694 following look dangerous to me. In fact I wouldn't guarantee that this won't result in a crash on wayland. The code paths have not been used in production for years.

Given that I would rather tend to just drop the ifdefs sections completely.

This revision now requires changes to proceed.Mar 6 2017, 7:15 PM

The ifdefs are from kde4 times. There it was also not needed, but nevertheless there. When working on the qt5 port I kept that under the assumption that the previous maintainer had a good reason for ifdefing it. Looking at the code I doubt it is side effect free. E.g. lines 694 following look dangerous to me. In fact I wouldn't guarantee that this won't result in a crash on wayland.

I'll remove the ones using m_clip, you're right that they're not const methods, so could potentially throw off any debug anyway.

The code paths have not been used in production for years.

That will also still effectively be the case here.
qCDebug() isn't a function like qDebug() but a very clever macro. The rest of the line is only evaluated if that category logging is enabled.

This revision was automatically updated to reflect the committed changes.