core/qmlglobal: configDir, configPath() -> shellDir, shellPath()

This commit is contained in:
outfoxxed 2025-07-19 02:58:55 -07:00
parent 77de23bb71
commit 63a6d27213
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 30 additions and 10 deletions

View file

@ -210,10 +210,22 @@ void QuickshellGlobal::onClipboardChanged(QClipboard::Mode mode) {
if (mode == QClipboard::Clipboard) emit this->clipboardTextChanged();
}
QString QuickshellGlobal::configDir() const {
QString QuickshellGlobal::shellDir() const {
return EngineGeneration::findObjectGeneration(this)->rootPath.path();
}
QString QuickshellGlobal::configDir() const {
qWarning() << "Quickshell.configDir is deprecated and may be removed in a future release. Use "
"Quickshell.shellDir.";
return this->shellDir();
}
QString QuickshellGlobal::shellRoot() const {
qWarning() << "Quickshell.shellRoot is deprecated and may be removed in a future release. Use "
"Quickshell.shellDir.";
return this->shellDir();
}
QString QuickshellGlobal::dataDir() const { // NOLINT
return QsPaths::instance()->shellDataDir().path();
}
@ -226,8 +238,14 @@ QString QuickshellGlobal::cacheDir() const { // NOLINT
return QsPaths::instance()->shellCacheDir().path();
}
QString QuickshellGlobal::shellPath(const QString& path) const {
return this->shellDir() % '/' % path;
}
QString QuickshellGlobal::configPath(const QString& path) const {
return this->configDir() % '/' % path;
qWarning() << "Quickshell.configPath() is deprecated and may be removed in a future release. Use "
"Quickshell.shellPath().";
return this->shellPath(path);
}
QString QuickshellGlobal::dataPath(const QString& path) const {