Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qqmlpreviewfileengine.h>
Public Member Functions | |
QQmlPreviewFileEngineHandler (QQmlPreviewFileLoader *loader) | |
std::unique_ptr< QAbstractFileEngine > | create (const QString &fileName) const override |
If this file handler can handle fileName, this method creates a file engine and returns it wrapped in a std::unique_ptr; otherwise returns nullptr. | |
Public Member Functions inherited from QAbstractFileEngineHandler | |
QAbstractFileEngineHandler () | |
Constructs a file handler and registers it with Qt. | |
virtual | ~QAbstractFileEngineHandler () |
Destroys the file handler. | |
Definition at line 91 of file qqmlpreviewfileengine.h.
QQmlPreviewFileEngineHandler::QQmlPreviewFileEngineHandler | ( | QQmlPreviewFileLoader * | loader | ) |
Definition at line 386 of file qqmlpreviewfileengine.cpp.
|
overridevirtual |
If this file handler can handle fileName, this method creates a file engine and returns it wrapped in a std::unique_ptr; otherwise returns nullptr.
Example:
Implements QAbstractFileEngineHandler.
Definition at line 391 of file qqmlpreviewfileengine.cpp.
References absolutePath(), QString::chop(), QPointer< T >::data(), QString::endsWith(), fileName, QQmlPreviewFileLoader::isBlacklisted(), QString::isEmpty(), isRootPath(), and QString::startsWith().