D28760: KSettings::Dialog: avoid duplicate entries due cascading $XDG_DATA_DIRS

Sune Vuorela noreply at phabricator.kde.org
Sun May 10 20:03:42 BST 2020


svuorela accepted this revision.
svuorela added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> dialog.cpp:317
>      const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("ksettingsdialog"),  QStandardPaths::LocateDirectory);
> +    QMap<QString /*fileName*/, QString /*fullPath*/> fileMap;
>      for (const QString &dir : dirs) {

I think I read once that whenever you used a ordered map over an unordered map, you need to justify it by talking to your manager about it. But that's also a bit from the bucket of nitpickery unless we are in a hot codepath.

> dialog.cpp:326
>      }
> +    for (auto it = fileMap.constBegin(); it != fileMap.constEnd(); ++it) {
> +        parseGroupFile(it.value());

nitpickery. but range based for and qAsConst on container?

REPOSITORY
  R295 KCMUtils

BRANCH
  fix_duplicates

REVISION DETAIL
  https://phabricator.kde.org/D28760

To: dfaure, apol, broulik, davidedmundson, kossebau, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200510/0d44ac95/attachment-0001.htm>


More information about the Kde-frameworks-devel mailing list