forked from quickshell/quickshell
core/qmlglobal!: rename shellRoot to configDir + add configPath
This commit is contained in:
parent
71fe3d9165
commit
0140356d99
2 changed files with 12 additions and 8 deletions
|
@ -177,12 +177,6 @@ void QuickshellGlobal::reload(bool hard) {
|
|||
root->reloadGraph(hard);
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::shellRoot() const {
|
||||
auto* generation = EngineGeneration::findObjectGeneration(this);
|
||||
// already canonical
|
||||
return generation->rootPath.path();
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::workingDirectory() const { // NOLINT
|
||||
return QuickshellSettings::instance()->workingDirectory();
|
||||
}
|
||||
|
@ -213,6 +207,10 @@ void QuickshellGlobal::onClipboardChanged(QClipboard::Mode mode) {
|
|||
if (mode == QClipboard::Clipboard) emit this->clipboardTextChanged();
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::configDir() const {
|
||||
return EngineGeneration::findObjectGeneration(this)->rootPath.path();
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::dataDir() const { // NOLINT
|
||||
return QsPaths::instance()->shellDataDir().path();
|
||||
}
|
||||
|
@ -225,6 +223,10 @@ QString QuickshellGlobal::cacheDir() const { // NOLINT
|
|||
return QsPaths::instance()->shellCacheDir().path();
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::configPath(const QString& path) const {
|
||||
return this->configDir() % '/' % path;
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::dataPath(const QString& path) const {
|
||||
return this->dataDir() % '/' % path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue