mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
core: reference configs by absolute instead of canonical paths
This commit is contained in:
4 files changed
+18
-9
No files matched your search
@@ -1,3 +1,14 @@
|
||||
## Breaking Changes
|
||||
|
||||
### Config paths are no longer canonicalized
|
||||
|
||||
This fixes nix configs changing shell-ids on rebuild as the shell id is now derived from
|
||||
the symlink path. Configs with a symlink in their path will have a different shell id.
|
||||
|
||||
Shell ids are used to derive the default config / state / cache folders, so those files
|
||||
will need to be manually moved if using a config behind a symlinked path without an explicitly
|
||||
set shell id.
|
||||
|
||||
## New Features
|
||||
|
||||
- Added support for creating wayland idle inhibitors.
|
||||
|
||||
+3
-3
@@ -163,7 +163,7 @@ bool QmlScanner::scanQmlFile(const QString& path, bool& singleton, bool& interna
|
||||
qCDebug(logQmlScanner) << "Found imports" << imports;
|
||||
}
|
||||
|
||||
auto currentdir = QDir(QFileInfo(path).canonicalPath());
|
||||
auto currentdir = QDir(QFileInfo(path).absolutePath());
|
||||
|
||||
// the root can never be a singleton so it dosent matter if we skip it
|
||||
this->scanDir(currentdir.path());
|
||||
@@ -179,9 +179,9 @@ bool QmlScanner::scanQmlFile(const QString& path, bool& singleton, bool& interna
|
||||
}
|
||||
|
||||
auto pathInfo = QFileInfo(ipath);
|
||||
auto cpath = pathInfo.canonicalFilePath();
|
||||
auto cpath = pathInfo.absoluteFilePath();
|
||||
|
||||
if (cpath.isEmpty()) {
|
||||
if (!pathInfo.exists()) {
|
||||
qCWarning(logQmlScanner) << "Ignoring unresolvable import" << ipath << "from" << path;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,7 @@ public:
|
||||
QmlScanner() = default;
|
||||
QmlScanner(const QDir& rootPath): rootPath(rootPath) {}
|
||||
|
||||
// path must be canonical
|
||||
void scanDir(const QString& path);
|
||||
|
||||
void scanQmlRoot(const QString& path);
|
||||
|
||||
QVector<QString> scannedDirs;
|
||||
|
||||
@@ -110,7 +110,7 @@ int locateConfigFile(CommandState& cmd, QString& path) {
|
||||
}
|
||||
|
||||
if (split[0].trimmed() == *cmd.config.name) {
|
||||
path = QDir(QFileInfo(file).canonicalPath()).filePath(split[1].trimmed());
|
||||
path = QDir(QFileInfo(file).absolutePath()).filePath(split[1].trimmed());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -140,8 +140,7 @@ int locateConfigFile(CommandState& cmd, QString& path) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
path = QFileInfo(path).canonicalFilePath();
|
||||
return 0;
|
||||
goto rpath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +153,8 @@ int locateConfigFile(CommandState& cmd, QString& path) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
path = QFileInfo(path).canonicalFilePath();
|
||||
rpath:
|
||||
path = QFileInfo(path).absoluteFilePath();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user