Reduce QString creation in Udev checking
ClosedPublic

Authored by davidedmundson on Oct 26 2017, 11:54 AM.

Details

Summary

UdevDevice creates a new QString in every wrapper.
For the most part this makes sense, but we may as well cache a property
if we're fetching it multiple times.

(we could even reduce it further and just use QByteArrays pointing to the
underlying char*s without copying)

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.
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 26 2017, 11:54 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
broulik accepted this revision.Oct 26 2017, 12:05 PM
This revision is now accepted and ready to land.Oct 26 2017, 12:05 PM
broulik added inline comments.Oct 26 2017, 12:06 PM
src/solid/devices/backends/udev/udevmanager.cpp
92

This is missing a colon

This revision was automatically updated to reflect the committed changes.