[FstabWatcher] Use static QStringLiteral instead of macro
ClosedPublic

Authored by bruns on Apr 12 2020, 6:17 PM.

Details

Summary

QFilesystemWatcher::addPath takes a QString as argument, so avoid
construction of tempary QString on each call.

This also avoids a name clash between the Solid::Backends::Fstab::FSTAB
logging category and the FSTAB macro.

Test Plan

no functional changes

Diff Detail

Repository
R245 Solid
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 12 2020, 6:17 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 12 2020, 6:17 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Apr 12 2020, 6:17 PM
apol accepted this revision.Apr 12 2020, 8:44 PM
This revision is now accepted and ready to land.Apr 12 2020, 8:44 PM

Don't use global statics in library code

apol added a comment.EditedApr 12 2020, 8:52 PM

Don't use global statics in library code

in case it gets statically compiled? Then putting it into the class scope should be enough AFAIR.

bruns updated this revision to Diff 79990.Apr 13 2020, 10:20 AM

move statics into namespace

This revision was automatically updated to reflect the committed changes.