remove another QRC hack in QDeclarativeTypeLoader::absoluteFilePath()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-11-20 11:37:34 +02:00
parent e4fe76e90d
commit bbd58c97cc

View file

@ -747,12 +747,8 @@ Returns a empty string if the path does not exist.
*/
QString QDeclarativeTypeLoader::absoluteFilePath(const QString &path)
{
if (path.isEmpty())
if (path.isEmpty()) {
return QString();
if (path.at(0) == QLatin1Char(':')) {
// qrc resource
QFileInfo fileInfo(path);
return fileInfo.isFile() ? fileInfo.absoluteFilePath() : QString();
}
int lastSlash = path.lastIndexOf(QLatin1Char('/'));