Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.4.3, 6.5.0
-
None
-
Xiaomi Redmi Note 7,8
Description
QFile on Android unable to open file content:// with space in the name
In order to open file need to replace spaces to "%20".
Workaround:
#ifdef Q_OS_ANDROID // patch for files containing spaces etc const QString sep {"raw%3A%2F"}; if (fileName.startsWith("content://") && fileName.contains(sep)) { QString contentUrl = fileName.split(sep).at(0); QString rawUrl = fileName.split(sep).at(1); rawUrl.replace(" ", "%20"); fileName = contentUrl + sep + rawUrl; } #endif