mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-06 19:14:57 +11:00
core: support qs. imports
This commit is contained in:
parent
3d594e16dd
commit
4b35d7b51b
7 changed files with 123 additions and 35 deletions
|
|
@ -45,6 +45,7 @@ class QsInterceptNetworkAccessManager: public QNetworkAccessManager {
|
|||
|
||||
public:
|
||||
QsInterceptNetworkAccessManager(
|
||||
const QDir& configRoot,
|
||||
const QHash<QString, QString>& fileIntercepts,
|
||||
QObject* parent = nullptr
|
||||
);
|
||||
|
|
@ -57,15 +58,21 @@ protected:
|
|||
) override;
|
||||
|
||||
private:
|
||||
QDir configRoot;
|
||||
const QHash<QString, QString>& fileIntercepts;
|
||||
};
|
||||
|
||||
class QsInterceptNetworkAccessManagerFactory: public QQmlNetworkAccessManagerFactory {
|
||||
public:
|
||||
QsInterceptNetworkAccessManagerFactory(const QHash<QString, QString>& fileIntercepts)
|
||||
: fileIntercepts(fileIntercepts) {}
|
||||
QsInterceptNetworkAccessManagerFactory(
|
||||
const QDir& configRoot,
|
||||
const QHash<QString, QString>& fileIntercepts
|
||||
)
|
||||
: configRoot(configRoot)
|
||||
, fileIntercepts(fileIntercepts) {}
|
||||
QNetworkAccessManager* create(QObject* parent) override;
|
||||
|
||||
private:
|
||||
QDir configRoot;
|
||||
const QHash<QString, QString>& fileIntercepts;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue