Review Request 119315: add an X-KDE-PluginInfo-Version to the plasma.desktop xsession desktop file
Harald Sitter
sitter at kde.org
Wed Jul 16 12:50:05 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119315/
-----------------------------------------------------------
(Updated July 16, 2014, 12:50 p.m.)
Status
------
This change has been marked as submitted.
Review request for Plasma.
Repository: plasma-workspace
Description
-------
this enables applications (such as the about-distro kcm) to list the
version of plasma the user is running at runtime in a somewhat reliable
manner, short of having a library function.
Diffs
-----
plasma.desktop.cmake f0b203e77d215f5afa04a6794e8ab69993ab4987
Diff: https://git.reviewboard.kde.org/r/119315/diff/
Testing
-------
read version... example code for reading:
const QStringList &filePaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
"xsessions/plasma.desktop");
if (filePaths.length() < 1) {
return QString();
}
// Despite the fact that there can be multiple desktop files we simply take
// the first one as users usually don't have xsessions/ in their $HOME
// data location, so the first match should (usually) be the only one and
// reflect the plasma session run.
KDesktopFile desktopFile(filePaths.first());
return desktopFile.desktopGroup().readEntry("X-KDE-PluginInfo-Version", QString());
Thanks,
Harald Sitter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140716/3ef1d68b/attachment-0001.html>
More information about the Plasma-devel
mailing list