Blackberry: Fix metadata reader for more recent OS versions
Change-Id: I33dae07736eb071f9db3e08c5342921a655ddd57 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
committed by
Qt by Nokia
parent
011e151c4e
commit
93823c2251
@@ -64,8 +64,13 @@ static const int mediaTypeVideoFlag = 2;
|
||||
bool BbMetaData::parse(const QString &contextName)
|
||||
{
|
||||
clear();
|
||||
const QString fileName =
|
||||
QString fileName =
|
||||
QString("/pps/services/multimedia/renderer/context/%1/metadata").arg(contextName);
|
||||
|
||||
// In newer OS versions, the filename is "metadata0", not metadata, so try both.
|
||||
if (!QFile::exists(fileName))
|
||||
fileName += '0';
|
||||
|
||||
QFile metaDataFile(fileName);
|
||||
if (!metaDataFile.open(QFile::ReadOnly)) {
|
||||
qWarning() << "Unable to open media metadata file" << fileName << ":"
|
||||
|
||||
Reference in New Issue
Block a user