D5170: Provide other functions to localized ~/Videos, ~/Music, etc with QStandardPaths
Chris Holland
noreply at phabricator.kde.org
Fri Mar 24 22:57:06 UTC 2017
Zren added a comment.
Thought you might want that, but wasn't sure how to expose QStandardPaths to QML. Got an example handy? All I can find is:
https://github.com/KDE/plasma-framework/blob/master/src/declarativeimports/plasmacomponents/enums.h
https://github.com/KDE/plasma-framework/blob/master/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp#L91
That seems to require the enum to be a child of a QObject.
The actual class itself isn't a QObject.
https://github.com/qt/qtbase/blob/dev/src/corelib/io/qstandardpaths.h
Which would mean rewriting the entire class like this guy did, with qstatic_casting either an int, or a copy of the enum.
https://forum.qt.io/topic/61543/qstandardpaths-not-available-in-qml/11
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D5170
To: Zren, hein
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170324/b59de4cb/attachment.html>
More information about the Plasma-devel
mailing list