forked from quickshell/quickshell
core: support root:
and root:/
paths for the config root
This works everywhere urls are accepted and rewrites them from the config root as a qsintercept url.
This commit is contained in:
parent
33fac67798
commit
0519acf1d6
7 changed files with 48 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <qcontainerfwd.h>
|
||||
#include <qdir.h>
|
||||
#include <qhash.h>
|
||||
#include <qloggingcategory.h>
|
||||
#include <qvector.h>
|
||||
|
@ -10,6 +11,8 @@ Q_DECLARE_LOGGING_CATEGORY(logQmlScanner);
|
|||
// expects canonical paths
|
||||
class QmlScanner {
|
||||
public:
|
||||
QmlScanner(const QDir& rootPath): rootPath(rootPath) {}
|
||||
|
||||
void scanDir(const QString& path);
|
||||
// returns if the file has a singleton
|
||||
bool scanQmlFile(const QString& path);
|
||||
|
@ -17,4 +20,7 @@ public:
|
|||
QVector<QString> scannedDirs;
|
||||
QVector<QString> scannedFiles;
|
||||
QHash<QString, QString> qmldirIntercepts;
|
||||
|
||||
private:
|
||||
QDir rootPath;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue