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,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <qdir.h>
|
||||
#include <qhash.h>
|
||||
#include <qloggingcategory.h>
|
||||
#include <qnetworkaccessmanager.h>
|
||||
|
@ -13,7 +14,12 @@ Q_DECLARE_LOGGING_CATEGORY(logQsIntercept);
|
|||
|
||||
class QsUrlInterceptor: public QQmlAbstractUrlInterceptor {
|
||||
public:
|
||||
QUrl intercept(const QUrl& url, QQmlAbstractUrlInterceptor::DataType type) override;
|
||||
explicit QsUrlInterceptor(const QDir& configRoot): configRoot(configRoot) {}
|
||||
|
||||
QUrl intercept(const QUrl& originalUrl, QQmlAbstractUrlInterceptor::DataType type) override;
|
||||
|
||||
private:
|
||||
QDir configRoot;
|
||||
};
|
||||
|
||||
class QsInterceptDataReply: public QNetworkReply {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue