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:
@@ -379,9 +379,9 @@ BaseFileWizardFactory::OverwriteResult BaseFileWizardFactory::promptOverwrite(Ge
|
||||
static const QString symLinkMsg = tr("[symbolic link]");
|
||||
|
||||
foreach (const GeneratedFile &file, *files) {
|
||||
const QFileInfo fi(file.path());
|
||||
if (fi.exists())
|
||||
existingFiles.append(file.path());
|
||||
const QString path = file.path();
|
||||
if (QFileInfo::exists(path))
|
||||
existingFiles.append(path);
|
||||
}
|
||||
if (existingFiles.isEmpty())
|
||||
return OverwriteOk;
|
||||
|
||||
Reference in New Issue
Block a user