|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
Checks every file the QML engine loads from a library against the trust store. More...
#include <qmltemplates_p.h>
Public Member Functions | |
| void | begin (const Locations &where) |
Starts checking, for the libraries and store in where; clears the record. | |
| void | end () |
| Stops checking (for compiling a template before it is saved). | |
| QList< TrustFile > | untrusted () const |
| The untrusted files recorded since begin(). | |
| bool | check (const QString &path) |
Checks path now, as intercept() would, recording it if it isn't trusted. | |
| bool | isTrusted (const QString &path) |
Whether path is trusted, without recording it (looking for a file that may be passed over, such as a value visualiser). | |
| QUrl | intercept (const QUrl &path, DataType type) override |
| See QQmlAbstractUrlInterceptor. | |
Private Member Functions | |
| bool | check (const QString &path, bool record) |
Checks path; records it if it isn't trusted and record. | |
Private Attributes | |
| QMutex | m_mutex |
| Guards everything below. | |
| bool | m_active = false |
| Whether files are checked. | |
| Locations | m_where |
| The libraries and store being checked against. | |
| QList< TrustFile > | m_untrusted |
| What was refused since begin(). | |
Checks every file the QML engine loads from a library against the trust store.
An untrusted file is redirected to a URL that can't load, and recorded, so the caller can say which files need trust instead of passing on the QML error. The engine may call intercept() from its loader thread.
|
inline |
Checks path now, as intercept() would, recording it if it isn't trusted.