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>.
Loading...
Searching...
No Matches
AndroidAssetsFileEngineHandler Class Reference

#include <qandroidassetsfileenginehandler.h>

+ Inheritance diagram for AndroidAssetsFileEngineHandler:
+ Collaboration diagram for AndroidAssetsFileEngineHandler:

Public Member Functions

 AndroidAssetsFileEngineHandler ()
 
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.
 
- Public Member Functions inherited from QAbstractFileEngineHandler
 QAbstractFileEngineHandler ()
 Constructs a file handler and registers it with Qt.
 
virtual ~QAbstractFileEngineHandler ()
 Destroys the file handler.
 

Detailed Description

Definition at line 16 of file qandroidassetsfileenginehandler.h.

Constructor & Destructor Documentation

◆ AndroidAssetsFileEngineHandler()

AndroidAssetsFileEngineHandler::AndroidAssetsFileEngineHandler ( )

Definition at line 377 of file qandroidassetsfileenginehandler.cpp.

References QtAndroid::assetManager().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

std::unique_ptr< QAbstractFileEngine > AndroidAssetsFileEngineHandler::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 383 of file qandroidassetsfileenginehandler.cpp.

References assetsPrefix, QString::chop(), fileName, QString::mid(), prefixSize, QString::remove(), and QString::replace().

+ Here is the call graph for this function:

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