Android: fix QDir::entryInfoList() with content URIs
Correctly return only the fileName portion from AndroidContentFileEngineIterator::currentFileName(); which QDirIteratorPrivate::matchesFilters() expects when looking for matches of the file pattern provided to the QDirIterator. Fixes: QTBUG-112738 Pick-to: 6.5 6.2 5.15 Change-Id: I98dba2df014b27f33cd7e54fab3ad2de8c7c1750 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
parent
4710fb3528
commit
f1778f34e0
@ -308,14 +308,14 @@ QString AndroidContentFileEngineIterator::currentFileName() const
|
|||||||
{
|
{
|
||||||
if (m_index < 0 || m_index > m_files.size())
|
if (m_index < 0 || m_index > m_files.size())
|
||||||
return QString();
|
return QString();
|
||||||
// Returns a full path since contstructing a content path from the file name
|
return m_files.at(m_index)->name();
|
||||||
// and a tree URI only will not point to a valid file URI.
|
|
||||||
return m_files.at(m_index)->uri().toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AndroidContentFileEngineIterator::currentFilePath() const
|
QString AndroidContentFileEngineIterator::currentFilePath() const
|
||||||
{
|
{
|
||||||
return currentFileName();
|
if (m_index < 0 || m_index > m_files.size())
|
||||||
|
return QString();
|
||||||
|
return m_files.at(m_index)->uri().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start of Cursor
|
// Start of Cursor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user