forked from qt-creator/qt-creator
Use QFileInfo::exists(...) which is faster that QFileInfo(..).exists
Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Laurent Montel
parent
f976dc96fd
commit
5d27bc747b
@@ -389,7 +389,7 @@ QVariant fixResourcePaths(const QVariant &value)
|
||||
if (qrcDefintion.count() == 2) {
|
||||
QString fixedPath = path;
|
||||
fixedPath.replace(QLatin1String("qrc:") + qrcDefintion.first(), qrcDefintion.last() + QLatin1Char('/'));
|
||||
if (QFileInfo(fixedPath).exists()) {
|
||||
if (QFileInfo::exists(fixedPath)) {
|
||||
fixedPath.replace(QLatin1String("//"), QLatin1String("/"));
|
||||
fixedPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
||||
return QUrl::fromLocalFile(fixedPath);
|
||||
@@ -410,7 +410,7 @@ QVariant fixResourcePaths(const QVariant &value)
|
||||
if (qrcDefintion.count() == 2) {
|
||||
QString fixedPath = str;
|
||||
fixedPath.replace(QLatin1String("qrc:") + qrcDefintion.first(), qrcDefintion.last() + QLatin1Char('/'));
|
||||
if (QFileInfo(fixedPath).exists()) {
|
||||
if (QFileInfo::exists(fixedPath)) {
|
||||
fixedPath.replace(QLatin1String("//"), QLatin1String("/"));
|
||||
fixedPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
||||
return fixedPath;
|
||||
|
||||
Reference in New Issue
Block a user