forked from quickshell/quickshell
core/qmlglobal: add dataPath(), statePath() and cachePath()
This commit is contained in:
parent
c1c24c2998
commit
a05c0de53b
3 changed files with 30 additions and 0 deletions
|
@ -155,6 +155,12 @@ public:
|
|||
/// Setting the `fallback` parameter of `iconPath` will attempt to load the fallback
|
||||
/// icon if the requested one could not be loaded.
|
||||
Q_INVOKABLE static QString iconPath(const QString& icon, const QString& fallback);
|
||||
/// Equivalent to `${Quickshell.dataDir}/${path}`
|
||||
Q_INVOKABLE [[nodiscard]] QString dataPath(const QString& path) const;
|
||||
/// Equivalent to `${Quickshell.stateDir}/${path}`
|
||||
Q_INVOKABLE [[nodiscard]] QString statePath(const QString& path) const;
|
||||
/// Equivalent to `${Quickshell.cacheDir}/${path}`
|
||||
Q_INVOKABLE [[nodiscard]] QString cachePath(const QString& path) const;
|
||||
|
||||
[[nodiscard]] QString shellRoot() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue