D23575: plasnoidviewer: restore support for --list & --list-themes
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Fri Aug 30 10:38:17 BST 2019
apol added inline comments.
INLINE COMMENTS
> main.cpp:87
> +
> + const QStringList basePaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "plasma/desktoptheme", QStandardPaths::LocateDirectory);
> + for (const QString& basePath : basePaths) {
You can use KPackage::PackageLoader::self()->listPackages().
> main.cpp:89
> + for (const QString& basePath : basePaths) {
> + const QStringList dirNames = QDir(basePath).entryList(QDir::Dirs | QDir::Hidden);
> + for (const QString& packageName : dirNames) {
QDir::NoDotAndDotDot.
Also you can use entryInfoList and avoid constructing the path inside.
> main.cpp:120
> + for (auto it = themes.constBegin(); it != themes.constEnd(); ++it) {
> + std::cout << it.key().leftJustified(maxLen, ' ').toLocal8Bit().data() << " - "
> + << it.value().toLocal8Bit().data() << std::endl;
qDebug? Or remove altogether.
REPOSITORY
R118 Plasma SDK
REVISION DETAIL
https://phabricator.kde.org/D23575
To: kossebau, #plasma, apol
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190830/b0e5df85/attachment-0001.html>
More information about the Plasma-devel
mailing list