Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QWasmFileEngineHandler Class Reference

#include <qwasmlocalfileengine_p.h>

Inheritance diagram for QWasmFileEngineHandler:
Collaboration diagram for QWasmFileEngineHandler:

Public Member Functions

 QWasmFileEngineHandler ()
virtual ~QWasmFileEngineHandler () override
virtual std::unique_ptr< QAbstractFileEnginecreate (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.
qstdweb::File getFile (const QString fileName)
qstdweb::FileSystemFileHandle getFileSystemFile (const QString fileName)
Public Member Functions inherited from QAbstractFileEngineHandler
 QAbstractFileEngineHandler ()
 Constructs a file handler and registers it with Qt.
virtual ~QAbstractFileEngineHandler ()
 Destroys the file handler.

Static Public Member Functions

static bool isWasmFileName (const QString &fileName)
static QString makeWasmFileName (const QString &fileName)
static QString nativeFileName (const QString &wasmFileName)
static QString addFile (qstdweb::File file)
static QString addFile (qstdweb::FileSystemFileHandle file)
static void removeFile (const QString fileName)

Detailed Description

Definition at line 24 of file qwasmlocalfileengine_p.h.

Constructor & Destructor Documentation

◆ QWasmFileEngineHandler()

QWasmFileEngineHandler::QWasmFileEngineHandler ( )

Definition at line 29 of file qwasmlocalfileengine.cpp.

◆ ~QWasmFileEngineHandler()

QWasmFileEngineHandler::~QWasmFileEngineHandler ( )
overridevirtual

Definition at line 33 of file qwasmlocalfileengine.cpp.

Member Function Documentation

◆ addFile() [1/2]

QString QWasmFileEngineHandler::addFile ( qstdweb::File file)
static

Definition at line 84 of file qwasmlocalfileengine.cpp.

◆ addFile() [2/2]

QString QWasmFileEngineHandler::addFile ( qstdweb::FileSystemFileHandle file)
static

Definition at line 93 of file qwasmlocalfileengine.cpp.

◆ create()

std::unique_ptr< QAbstractFileEngine > QWasmFileEngineHandler::create ( const QString & fileName) const
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:

std::unique_ptr<QAbstractFileEngine> ZipEngineHandler::create(const QString &fileName) const
{
// ZipEngineHandler returns a ZipEngine for all .zip files
if (fileName.toLower().endsWith(".zip"_L1))
return std::make_unique<ZipEngine>(fileName);
else
return {};
}
See also
QAbstractFileEngine::create()

Implements QAbstractFileEngineHandler.

Definition at line 37 of file qwasmlocalfileengine.cpp.

◆ getFile()

qstdweb::File QWasmFileEngineHandler::getFile ( const QString fileName)

Definition at line 108 of file qwasmlocalfileengine.cpp.

◆ getFileSystemFile()

qstdweb::FileSystemFileHandle QWasmFileEngineHandler::getFileSystemFile ( const QString fileName)

Definition at line 113 of file qwasmlocalfileengine.cpp.

◆ isWasmFileName()

bool QWasmFileEngineHandler::isWasmFileName ( const QString & fileName)
static

Definition at line 56 of file qwasmlocalfileengine.cpp.

◆ makeWasmFileName()

QString QWasmFileEngineHandler::makeWasmFileName ( const QString & fileName)
static

Definition at line 62 of file qwasmlocalfileengine.cpp.

◆ nativeFileName()

QString QWasmFileEngineHandler::nativeFileName ( const QString & wasmFileName)
static

Definition at line 70 of file qwasmlocalfileengine.cpp.

◆ removeFile()

void QWasmFileEngineHandler::removeFile ( const QString fileName)
static

Definition at line 102 of file qwasmlocalfileengine.cpp.


The documentation for this class was generated from the following files: