Fix AndroidAbstractFileEngine
"" it's the root folder of the assets, setting m_fileName = "" will make AndroidAbstractFileEngine::setFileName to fail and it will not set the proper flags. Fixes: QTBUG-81535 Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
9ecc595d71
commit
0947cf66e5
@ -110,6 +110,8 @@ public:
|
|||||||
|
|
||||||
static AssetItem::Type fileType(const QString &filePath)
|
static AssetItem::Type fileType(const QString &filePath)
|
||||||
{
|
{
|
||||||
|
if (filePath.isEmpty())
|
||||||
|
return AssetItem::Type::Folder;
|
||||||
const QStringList paths = filePath.split(QLatin1Char('/'));
|
const QStringList paths = filePath.split(QLatin1Char('/'));
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
AssetItem::Type res = AssetItem::Type::Invalid;
|
AssetItem::Type res = AssetItem::Type::Invalid;
|
||||||
@ -399,7 +401,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
AAsset *m_assetFile = nullptr;
|
AAsset *m_assetFile = nullptr;
|
||||||
AAssetManager *m_assetManager = nullptr;
|
AAssetManager *m_assetManager = nullptr;
|
||||||
QString m_fileName;
|
// initialize with a name that can't be used as a file name
|
||||||
|
QString m_fileName = QLatin1String(".");
|
||||||
bool m_isFolder = false;
|
bool m_isFolder = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user