D11452: sanitizer: Improve device listing
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Thu Apr 5 21:42:41 UTC 2018
bruns added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:251
> + // TODO coloring would be nice, but "...|grep '^!'" does not work with it.
> + // out << QStringLiteral("%1").arg(dev.mounted ? "+" : "\033[1;31m!")
> + out << QStringLiteral("%1").arg(dev.mounted ? "+" : "!")
You can check if your output goes to a tty or is redirected:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qlogging.cpp#n263
> databasesanitizer.cpp:253
> + out << QStringLiteral("%1").arg(dev.mounted ? "+" : "!")
> + << sep << QStringLiteral("device:%1").arg(dev.id)
> + << sep << QStringLiteral("indexed-items:%1").arg(dev.items);
print as hex(major):hex(minor) ?
> fsutils.cpp:111
> +
> +const QVector<FSUtils::DeviceInfo> FSUtils::attachedDevices()
> +{
Use of Solid would be preferred.
> fsutils.h:51
> + quint64 id = 0;
> + QString filesystem = QString();
> + QString name = QString();
No need for explicitly calling the default constructor, this is only needed for POD types (e.g. quint64).
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D11452
To: michaelh, #baloo, #frameworks
Cc: bruns, smithjd, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180405/f0cae581/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list