forked from qt-creator/qt-creator
Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possible
Faster. Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81 Reviewed-by: Marc Reilly <marc.reilly@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -272,7 +272,7 @@ static bool isValidExampleOrDemo(ExampleItem &item)
|
||||
doesn't have any namespace */
|
||||
QString reason;
|
||||
bool ok = true;
|
||||
if (!item.hasSourceCode || !QFileInfo(item.projectPath).exists()) {
|
||||
if (!item.hasSourceCode || !QFileInfo::exists(item.projectPath)) {
|
||||
ok = false;
|
||||
reason = QString::fromLatin1("projectPath \"%1\" empty or does not exist").arg(item.projectPath);
|
||||
} else if (item.imageUrl.startsWith(invalidPrefix) || !QUrl(item.imageUrl).isValid()) {
|
||||
|
||||
Reference in New Issue
Block a user