diff options
Diffstat (limited to 'src')
53 files changed, 77 insertions, 98 deletions
diff --git a/src/libs/ssh/sshkeycreationdialog.cpp b/src/libs/ssh/sshkeycreationdialog.cpp index ff38fe239f..39d36aa993 100644 --- a/src/libs/ssh/sshkeycreationdialog.cpp +++ b/src/libs/ssh/sshkeycreationdialog.cpp @@ -142,7 +142,7 @@ void SshKeyCreationDialog::saveKeys() bool SshKeyCreationDialog::userForbidsOverwriting() { - if (!QFileInfo(privateKeyFilePath()).exists() && !QFileInfo(publicKeyFilePath()).exists()) + if (!QFileInfo::exists(privateKeyFilePath()) && !QFileInfo::exists(publicKeyFilePath())) return false; const QMessageBox::StandardButton reply = QMessageBox::question(this, tr("File Exists"), tr("There already is a file of that name. Do you want to overwrite it?"), diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp index 39c3b7cfea..a80b4aab76 100644 --- a/src/libs/utils/buildablehelperlibrary.cpp +++ b/src/libs/utils/buildablehelperlibrary.cpp @@ -269,7 +269,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments, log->append(newline); const FileName makeFullPath = arguments.environment.searchInPath(arguments.makeCommand); - if (QFileInfo(arguments.directory + QLatin1String("/Makefile")).exists()) { + if (QFileInfo::exists(arguments.directory + QLatin1String("/Makefile"))) { if (makeFullPath.isEmpty()) { *errorMessage = QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary", "%1 not found in PATH\n").arg(arguments.makeCommand); diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 895c745f2b..cf9cd65fd9 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1213,7 +1213,7 @@ static FileName javaHomeForJavac(const FileName &location) while (tries > 0) { QDir dir = fileInfo.dir(); dir.cdUp(); - if (QFileInfo(dir.filePath(QLatin1String("lib/tools.jar"))).exists()) + if (QFileInfo::exists(dir.filePath(QLatin1String("lib/tools.jar")))) return FileName::fromString(dir.path()); if (fileInfo.isSymLink()) fileInfo.setFile(fileInfo.symLinkTarget()); @@ -1252,7 +1252,7 @@ void AndroidConfigurations::load() } } else if (HostOsInfo::isMacHost()) { QString javaHome = QLatin1String("/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"); - if (QFileInfo(javaHome).exists()) + if (QFileInfo::exists(javaHome)) m_config.setOpenJDKLocation(Utils::FileName::fromString(javaHome)); } else if (HostOsInfo::isWindowsHost()) { QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Javasoft\\Java Development Kit"), QSettings::NativeFormat); @@ -1275,7 +1275,7 @@ void AndroidConfigurations::load() settings.beginGroup(version); QString tmpJavaHome = settings.value(QLatin1String("JavaHome")).toString(); settings.endGroup(); - if (!QFileInfo(tmpJavaHome).exists()) + if (!QFileInfo::exists(tmpJavaHome)) continue; major = tmpMajor; diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp index bb60e33ad0..f02ae1d413 100644 --- a/src/plugins/android/androidmanifesteditorwidget.cpp +++ b/src/plugins/android/androidmanifesteditorwidget.cpp @@ -1259,7 +1259,7 @@ QIcon AndroidManifestEditorWidget::icon(const QString &baseDir, IconDPI dpi) void AndroidManifestEditorWidget::copyIcon(IconDPI dpi, const QString &baseDir, const QString &filePath) { - if (!QFileInfo(filePath).exists()) + if (!QFileInfo::exists(filePath)) return; const QString targetPath = iconPath(baseDir, dpi); diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index ff1841e048..22f0da7fa5 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -122,7 +122,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const env.set(QLatin1String("ANDROID_NDK_TOOLS_PREFIX"), AndroidConfig::toolsPrefix(targetAbi().architecture())); env.set(QLatin1String("ANDROID_NDK_TOOLCHAIN_VERSION"), m_ndkToolChainVersion); QString javaHome = AndroidConfigurations::currentConfig().openJDKLocation().toString(); - if (!javaHome.isEmpty() && QFileInfo(javaHome).exists()) + if (!javaHome.isEmpty() && QFileInfo::exists(javaHome)) env.set(QLatin1String("JAVA_HOME"), javaHome); env.set(QLatin1String("ANDROID_HOME"), AndroidConfigurations::currentConfig().sdkLocation().toString()); env.set(QLatin1String("ANDROID_SDK_ROOT"), AndroidConfigurations::currentConfig().sdkLocation().toString()); diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp index 63edb32101..2f92f93021 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp @@ -173,9 +173,8 @@ void AutoreconfStep::run(QFutureInterface<bool> &interface) // Check whether we need to run autoreconf const QString projectDir(bc->target()->project()->projectDirectory().toString()); - const QFileInfo configureInfo(projectDir + QLatin1String("/configure")); - if (!configureInfo.exists()) + if (!QFileInfo::exists(projectDir + QLatin1String("/configure"))) m_runAutoreconf = true; if (!m_runAutoreconf) { diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index 7e8450cc85..873c5b5deb 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -219,7 +219,7 @@ CMakeEditorWidget::Link CMakeEditorWidget::findLinkAt(const QTextCursor &cursor, if (fi.isDir()) { QDir subDir(fi.absoluteFilePath()); QString subProject = subDir.filePath(QLatin1String("CMakeLists.txt")); - if (QFileInfo(subProject).exists()) + if (QFileInfo::exists(subProject)) fileName = subProject; else return link; diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp index 29b1e67967..9af767c10c 100644 --- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp @@ -147,10 +147,7 @@ CMakeManager *CMakeOpenProjectWizard::cmakeManager() const bool CMakeOpenProjectWizard::hasInSourceBuild() const { - QFileInfo fi(m_sourceDirectory + QLatin1String("/CMakeCache.txt")); - if (fi.exists()) - return true; - return false; + return QFileInfo::exists(m_sourceDirectory + QLatin1String("/CMakeCache.txt")); } bool CMakeOpenProjectWizard::compatibleKitExist() const diff --git a/src/plugins/coreplugin/basefilewizardfactory.cpp b/src/plugins/coreplugin/basefilewizardfactory.cpp index 5db42a6926..032a76bd29 100644 --- a/src/plugins/coreplugin/basefilewizardfactory.cpp +++ b/src/plugins/coreplugin/basefilewizardfactory.cpp @@ -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; diff --git a/src/plugins/coreplugin/helpmanager.cpp b/src/plugins/coreplugin/helpmanager.cpp index f5b159e143..61a6e744de 100644 --- a/src/plugins/coreplugin/helpmanager.cpp +++ b/src/plugins/coreplugin/helpmanager.cpp @@ -441,7 +441,7 @@ void HelpManager::verifyDocumenation() { const QStringList ®isteredDocs = d->m_helpEngine->registeredDocumentations(); foreach (const QString &nameSpace, registeredDocs) { - if (!QFileInfo(d->m_helpEngine->documentationFileName(nameSpace)).exists()) + if (!QFileInfo::exists(d->m_helpEngine->documentationFileName(nameSpace))) d->m_nameSpacesToUnregister.append(nameSpace); } } diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 2dd615469a..495b202fe4 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -410,8 +410,7 @@ QString ICore::userResourcePath() const QString configDir = QFileInfo(settings(QSettings::UserScope)->fileName()).path(); const QString urp = configDir + QLatin1String("/qtcreator"); - QFileInfo fi(urp + QLatin1Char('/')); - if (!fi.exists()) { + if (!QFileInfo::exists(urp + QLatin1Char('/'))) { QDir dir; if (!dir.mkpath(urp)) qWarning() << "could not create" << urp; diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp index 87dd02cef2..0a2a98efb9 100644 --- a/src/plugins/coreplugin/locator/filesystemfilter.cpp +++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp @@ -134,7 +134,7 @@ QList<LocatorFilterEntry> FileSystemFilter::matchesFor(QFutureInterface<Core::Lo // "create and open" functionality const QString fullFilePath = dirInfo.filePath(name); - if (!QFileInfo(fullFilePath).exists() && dirInfo.exists()) { + if (!QFileInfo::exists(fullFilePath) && dirInfo.exists()) { LocatorFilterEntry createAndOpen(this, tr("Create and Open \"%1\"").arg(entry), fullFilePath); createAndOpen.extraInfo = Utils::FileUtils::shortNativePath( Utils::FileName::fromString(dirInfo.absolutePath())); diff --git a/src/plugins/cppeditor/fileandtokenactions_test.cpp b/src/plugins/cppeditor/fileandtokenactions_test.cpp index 4af78e1250..b581f0938c 100644 --- a/src/plugins/cppeditor/fileandtokenactions_test.cpp +++ b/src/plugins/cppeditor/fileandtokenactions_test.cpp @@ -171,8 +171,7 @@ TestActionsTestCase::TestActionsTestCase(const Actions &tokenActions, const Acti // Process all files from the projects foreach (const QString filePath, filesToOpen) { // Skip e.g. "<configuration>" - const QFileInfo fileInfo(filePath); - if (!fileInfo.exists()) + if (!QFileInfo::exists(filePath)) continue; qDebug() << " --" << filePath; diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp index cb51113d39..dfc1ed0d0d 100644 --- a/src/plugins/cpptools/cppmodelmanager_test.cpp +++ b/src/plugins/cpptools/cppmodelmanager_test.cpp @@ -123,7 +123,7 @@ public: ExampleProjectConfigurator(const QString &projectFile) { const QString projectUserFile = projectFile + _(".user"); - QVERIFY(!QFileInfo(projectUserFile).exists()); + QVERIFY(!QFileInfo::exists(projectUserFile)); // Open project QString errorOpeningProject; diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp index 8188dfbcb1..00750ed0d9 100644 --- a/src/plugins/cpptools/cpptoolstestcase.cpp +++ b/src/plugins/cpptools/cpptoolstestcase.cpp @@ -195,7 +195,7 @@ bool TestCase::writeFile(const QString &filePath, const QByteArray &contents) FileWriterAndRemover::FileWriterAndRemover(const QString &filePath, const QByteArray &contents) : m_filePath(filePath) { - if (QFileInfo(filePath).exists()) { + if (QFileInfo::exists(filePath)) { const QString warning = QString::fromLatin1( "Will not overwrite existing file: \"%1\"." " If this file is left over due to a(n) abort/crash, please remove manually.") diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 59c3fe7906..979e4a00db 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1417,7 +1417,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data) //qDebug() << "BP " << rid << data.toString(); // Quickly set the location marker. if (lineNumber && !boolSetting(OperateByInstruction) - && QFileInfo(fullName).exists() + && QFileInfo::exists(fullName) && !isQmlStepBreakpoint(rid) && !isQFatalBreakpoint(rid)) gotoLocation(Location(fullName, lineNumber)); diff --git a/src/plugins/debugger/gdb/startgdbserverdialog.cpp b/src/plugins/debugger/gdb/startgdbserverdialog.cpp index 835ad44f04..1147074722 100644 --- a/src/plugins/debugger/gdb/startgdbserverdialog.cpp +++ b/src/plugins/debugger/gdb/startgdbserverdialog.cpp @@ -172,22 +172,22 @@ void GdbServerStarter::attach(int port) QString binary; QString localExecutable; QString candidate = sysroot + d->process.exe; - if (QFileInfo(candidate).exists()) + if (QFileInfo::exists(candidate)) localExecutable = candidate; if (localExecutable.isEmpty()) { binary = d->process.cmdLine.section(QLatin1Char(' '), 0, 0); candidate = sysroot + QLatin1Char('/') + binary; - if (QFileInfo(candidate).exists()) + if (QFileInfo::exists(candidate)) localExecutable = candidate; } if (localExecutable.isEmpty()) { candidate = sysroot + QLatin1String("/usr/bin/") + binary; - if (QFileInfo(candidate).exists()) + if (QFileInfo::exists(candidate)) localExecutable = candidate; } if (localExecutable.isEmpty()) { candidate = sysroot + QLatin1String("/bin/") + binary; - if (QFileInfo(candidate).exists()) + if (QFileInfo::exists(candidate)) localExecutable = candidate; } if (localExecutable.isEmpty()) { diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index d7e9ccddb6..8c2b432cba 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -768,7 +768,7 @@ void PdbEngine::handleBacktrace(const PdbResponse &response) frame.line = lineNumber; frame.function = _(line.mid(pos2 + 1)); frame.usable = QFileInfo(frame.file).isReadable(); - if (frame.line > 0 && QFileInfo(frame.file).exists()) { + if (frame.line > 0 && QFileInfo::exists(frame.file)) { if (line.startsWith("> ")) currentIndex = level; frame.level = level; diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index e5ce9f2c23..1f559109d7 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -3225,8 +3225,8 @@ bool GitClient::synchronousMerge(const QString &workingDirectory, const QString bool GitClient::canRebase(const QString &workingDirectory) const { const QString gitDir = findGitDirForRepository(workingDirectory); - if (QFileInfo(gitDir + QLatin1String("/rebase-apply")).exists() - || QFileInfo(gitDir + QLatin1String("/rebase-merge")).exists()) { + if (QFileInfo::exists(gitDir + QLatin1String("/rebase-apply")) + || QFileInfo::exists(gitDir + QLatin1String("/rebase-merge"))) { VcsOutputWindow::appendError( tr("Rebase, merge or am is in progress. Finish " "or abort it and then try again.")); diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp index d3f70b6ebe..de7f211966 100644 --- a/src/plugins/ios/iosrunner.cpp +++ b/src/plugins/ios/iosrunner.cpp @@ -117,7 +117,7 @@ void IosRunner::start() } m_cleanExit = false; m_qmlPort = 0; - if (!QFileInfo(m_bundleDir).exists()) { + if (!QFileInfo::exists(m_bundleDir)) { TaskHub::addTask(Task::Warning, tr("Could not find %1.").arg(m_bundleDir), ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT); diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp index e941397672..ccb515b123 100644 --- a/src/plugins/perforce/perforcechecker.cpp +++ b/src/plugins/perforce/perforcechecker.cpp @@ -181,8 +181,7 @@ void PerforceChecker::parseOutput(const QString &response) return; } // Check existence. No precise check here, might be a symlink - const QFileInfo fi(repositoryRoot); - if (fi.exists()) { + if (QFileInfo::exists(repositoryRoot)) { emitSucceeded(repositoryRoot); } else { emitFailed(tr("The repository \"%1\" does not exist."). diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index c1dd6ad92c..5689471d9f 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -203,10 +203,8 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi) } } - - QString effectiveCommand = m_param.effectiveCommand(); - if (!QFileInfo(effectiveCommand).exists()) { + if (!QFileInfo::exists(effectiveCommand)) { processStartupFailed(); fi.reportResult(false); emit finished(); diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp index 138ea4336a..f730819b1a 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp @@ -511,7 +511,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const QDir &baseDir, strVal = data.value(QLatin1String(ICON_KEY)).toString(); if (!strVal.isEmpty()) { strVal = baseDir.absoluteFilePath(strVal); - if (!QFileInfo(strVal).exists()) { + if (!QFileInfo::exists(strVal)) { *errorMessage = tr("Icon \"%1\" not found.").arg(strVal); return false; } diff --git a/src/plugins/projectexplorer/localapplicationruncontrol.cpp b/src/plugins/projectexplorer/localapplicationruncontrol.cpp index d2d877ce66..6b264799b5 100644 --- a/src/plugins/projectexplorer/localapplicationruncontrol.cpp +++ b/src/plugins/projectexplorer/localapplicationruncontrol.cpp @@ -99,7 +99,7 @@ void LocalApplicationRunControl::start() if (m_executable.isEmpty()) { appendMessage(tr("No executable specified.") + QLatin1Char('\n'), Utils::ErrorMessageFormat); emit finished(); - } else if (!QFileInfo(m_executable).exists()){ + } else if (!QFileInfo::exists(m_executable)) { appendMessage(tr("Executable %1 does not exist.").arg(QDir::toNativeSeparators(m_executable)) + QLatin1Char('\n'), Utils::ErrorMessageFormat); emit finished(); diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 104d6b41d9..cbf4962166 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -308,7 +308,7 @@ static QString winExpandDelayedEnvReferences(QString in, const Utils::Environmen Utils::Environment MsvcToolChain::readEnvironmentSetting(Utils::Environment& env) const { Utils::Environment result = env; - if (!QFileInfo(m_vcvarsBat).exists()) + if (!QFileInfo::exists(m_vcvarsBat)) return result; QMap<QString, QString> envPairs; @@ -354,7 +354,7 @@ bool MsvcToolChain::isValid() const if (!AbstractMsvcToolChain::isValid()) return false; QString vcVarsBat = MsvcToolChainFactory::vcVarsBatFor(QFileInfo(m_vcvarsBat).absolutePath(), m_varsBatArg); - return QFileInfo(vcVarsBat).exists(); + return QFileInfo::exists(vcVarsBat); } MsvcToolChain::MsvcToolChain() : diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp index 83e5a72346..55d76c1a57 100644 --- a/src/plugins/projectexplorer/wincetoolchain.cpp +++ b/src/plugins/projectexplorer/wincetoolchain.cpp @@ -117,7 +117,7 @@ static QString winExpandDelayedEnvReferences(QString in, const Utils::Environmen Utils::Environment WinCEToolChain::readEnvironmentSetting(Utils::Environment &env) const { Utils::Environment result = env; - if (!QFileInfo(m_vcvarsBat).exists()) + if (!QFileInfo::exists(m_vcvarsBat)) return result; // Get the env pairs diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp index 0fc02608af..5fdaf2a256 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp @@ -91,7 +91,7 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, // Some people don't like it when files are created as a side effect of opening a project, // so do not store the build graph if the build directory does not exist yet. - params.setDryRun(!QFileInfo(dir).exists()); + params.setDryRun(!QFileInfo::exists(dir)); params.setBuildRoot(dir); params.setProjectFilePath(m_projectFilePath); diff --git a/src/plugins/qmakeprojectmanager/makestep.cpp b/src/plugins/qmakeprojectmanager/makestep.cpp index 4ebb4a2b9e..9f69c18e5d 100644 --- a/src/plugins/qmakeprojectmanager/makestep.cpp +++ b/src/plugins/qmakeprojectmanager/makestep.cpp @@ -281,7 +281,7 @@ void MakeStep::run(QFutureInterface<bool> & fi) return; } - if (!QFileInfo(m_makeFileToCheck).exists()) { + if (!QFileInfo::exists(m_makeFileToCheck)) { if (!ignoreReturnValue()) emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::MessageOutput); fi.reportResult(ignoreReturnValue()); diff --git a/src/plugins/qmakeprojectmanager/profileeditor.cpp b/src/plugins/qmakeprojectmanager/profileeditor.cpp index b183f685ed..adb7b2731a 100644 --- a/src/plugins/qmakeprojectmanager/profileeditor.cpp +++ b/src/plugins/qmakeprojectmanager/profileeditor.cpp @@ -144,7 +144,7 @@ ProFileEditorWidget::Link ProFileEditorWidget::findLinkAt(const QTextCursor &cur if (fi.isDir()) { QDir subDir(fi.absoluteFilePath()); QString subProject = subDir.filePath(subDir.dirName() + QLatin1String(".pro")); - if (QFileInfo(subProject).exists()) + if (QFileInfo::exists(subProject)) fileName = subProject; else return link; diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index 37f871cb2a..f0eb2a96f2 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -361,7 +361,7 @@ MakeStep *QmakeBuildConfiguration::makeStep() const QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportFrom(const QString &makefile) { QMakeStep *qs = qmakeStep(); - if (QFileInfo(makefile).exists() && qs) { + if (QFileInfo::exists(makefile) && qs) { FileName qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(makefile); BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit()); if (!version) @@ -507,7 +507,7 @@ FileName QmakeBuildConfiguration::extractSpecFromArguments(QString *args, // if it is the former we need to get the canonical form // for the other one we don't need to do anything if (parsedSpec.toFileInfo().isRelative()) { - if (QFileInfo(directory + QLatin1Char('/') + parsedSpec.toString()).exists()) + if (QFileInfo::exists(directory + QLatin1Char('/') + parsedSpec.toString())) parsedSpec = FileName::fromUserInput(directory + QLatin1Char('/') + parsedSpec.toString()); else parsedSpec = FileName::fromUserInput(baseMkspecDir.toString() + QLatin1Char('/') + parsedSpec.toString()); diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index d2c2cc8e8d..26b3a6de6d 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1437,7 +1437,7 @@ bool QmakeProject::requiresTargetPanel() const // but more pratical then duplicated the code everywhere QString QmakeProject::disabledReasonForRunConfiguration(const QString &proFilePath) { - if (!QFileInfo(proFilePath).exists()) + if (!QFileInfo::exists(proFilePath)) return tr("The .pro file \"%1\" does not exist.") .arg(QFileInfo(proFilePath).fileName()); diff --git a/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp index 2114433747..8b4e5d62d6 100644 --- a/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp @@ -322,7 +322,7 @@ Core::GeneratedFiles QtQuickApp::generateFiles(QString *errorMessage) const files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml))); files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute); } - if (QFileInfo(path(MainQrcOrigin)).exists()) { + if (QFileInfo::exists(path(MainQrcOrigin))) { files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQrcFile, errorMessage), path(MainQrc))); } if (!qrcDeployment().isEmpty()) { diff --git a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.cpp b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.cpp index 84e0c9c6bd..2ac6f9b2e8 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.cpp @@ -132,11 +132,11 @@ void FileResourcesModel::openFileDialog() //Next we try to fall back to the path any file browser was opened with - if (!QFileInfo(path).exists()) + if (!QFileInfo::exists(path)) path = s_lastBrowserPath; //The last fallback is to try the path of the document - if (!QFileInfo(path).exists()) + if (!QFileInfo::exists(path)) path = modelPath; QString newFile = QFileDialog::getOpenFileName(Core::ICore::mainWindow(), tr("Open File"), path, m_filter); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 002695840c..4d3b627478 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -93,7 +93,7 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE m_view(new Quick2PropertyEditorView), m_propertyEditorTransaction(new PropertyEditorTransaction(propertyEditor)), m_dummyPropertyEditorValue(new PropertyEditorValue()), m_contextObject(new PropertyEditorContextObject()) { - Q_ASSERT(QFileInfo(":/images/button_normal.png").exists()); + Q_ASSERT(QFileInfo::exists(":/images/button_normal.png")); m_view->engine()->setOutputWarningsToStandardError( !qgetenv("QTCREATOR_QTQUICKDESIGNER_PROPERTYEDITOR_SHOW_WARNINGS").isEmpty()); @@ -436,7 +436,7 @@ QString PropertyEditorQmlBackend::fileFromUrl(const QUrl &url) bool PropertyEditorQmlBackend::checkIfUrlExists(const QUrl &url) { - return (QFileInfo(fileFromUrl(url)).exists()); + return QFileInfo::exists(fileFromUrl(url)); } void PropertyEditorQmlBackend::emitSelectionToBeChanged() diff --git a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp index b7f876605c..728f66f5cc 100644 --- a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp +++ b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp @@ -114,7 +114,7 @@ void AddTabDesignerAction::addNewTab() QString directoryPath = QFileInfo(selectionContext().view()->model()->fileUrl().toLocalFile()).absolutePath(); QString newFilePath = directoryPath +QStringLiteral("/") + tabName + QStringLiteral(".qml"); - if (QFileInfo(newFilePath).exists()) { + if (QFileInfo::exists(newFilePath)) { QMessageBox::warning(Core::ICore::mainWindow(), tr("Naming Error"), tr("Component already exists.")); } else { const QString sourceString = QStringLiteral("import QtQuick 2.1\nimport QtQuick.Controls 1.0\n\nItem {\n anchors.fill: parent\n}"); diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index 0e880b4f94..f8b29b58fd 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -189,7 +189,7 @@ QmlItemNode QmlItemNode::createQmlItemNodeFromImage(AbstractView *view, const QS QString relativeImageName = imageName; //use relative path - if (QFileInfo(view->model()->fileUrl().toLocalFile()).exists()) { + if (QFileInfo::exists(view->model()->fileUrl().toLocalFile())) { QDir fileDir(QFileInfo(view->model()->fileUrl().toLocalFile()).absolutePath()); relativeImageName = fileDir.relativeFilePath(imageName); propertyPairList.append(qMakePair(PropertyName("source"), QVariant(relativeImageName))); diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp index b91a5c7eb7..d4ebebcd56 100644 --- a/src/plugins/qmljseditor/qmljscompletionassist.cpp +++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp @@ -921,7 +921,7 @@ bool QmlJSCompletionAssistProcessor::completeFileName(const QString &relativeBas } else { directoryPrefix = fileInfo.path(); } - if (!QFileInfo(directoryPrefix).exists()) + if (!QFileInfo::exists(directoryPrefix)) return false; QDirIterator dirIterator(directoryPrefix, diff --git a/src/plugins/qmljstools/qmljsbundleprovider.cpp b/src/plugins/qmljstools/qmljsbundleprovider.cpp index 64a2e12147..80a8d93445 100644 --- a/src/plugins/qmljstools/qmljsbundleprovider.cpp +++ b/src/plugins/qmljstools/qmljsbundleprovider.cpp @@ -63,7 +63,7 @@ QmlBundle BasicBundleProvider::defaultBundle(const QString &bundleInfoName) QString defaultBundlePath = Core::ICore::resourcePath() + QLatin1String("/qml-type-descriptions/") + bundleInfoName; - if (!QFileInfo(defaultBundlePath).exists()) { + if (!QFileInfo::exists(defaultBundlePath)) { qWarning() << "BasicBundleProvider: ERROR " << defaultBundlePath << " not found"; return res; diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 52e25b56c4..3d0eabf9af 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -292,8 +292,7 @@ void QmlProjectRunConfiguration::updateEnabled() qmlFileFound = !mainScript().isEmpty(); } - bool newValue = QFileInfo(executable()).exists() && qmlFileFound; - + bool newValue = QFileInfo::exists(executable()) && qmlFileFound; // Always emit change signal to force reevaluation of run/debug buttons m_isEnabled = newValue; diff --git a/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp b/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp index 5634d1727d..58f2f20836 100644 --- a/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp +++ b/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp @@ -145,7 +145,7 @@ void BarDescriptorEditorEntryPointWidget::handleIconChanged(const QString &path) emit imageRemoved(m_prevIconPath); m_prevIconPath = path; - if (QFileInfo(path).exists()) + if (QFileInfo::exists(path)) emit imageAdded(path); } diff --git a/src/plugins/qnx/bardescriptorfilenodemanager.cpp b/src/plugins/qnx/bardescriptorfilenodemanager.cpp index 7bb71a4e66..cf1abcc761 100644 --- a/src/plugins/qnx/bardescriptorfilenodemanager.cpp +++ b/src/plugins/qnx/bardescriptorfilenodemanager.cpp @@ -148,7 +148,7 @@ void BarDescriptorFileNodeManager::updateBarDescriptorNodes(ProjectExplorer::Pro if (!projectNode) continue; - if (!QFileInfo(package.appDescriptorPath()).exists()) { + if (!QFileInfo::exists(package.appDescriptorPath())) { if (!attemptCreate) continue; diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp index 7f649bb407..dd342202e3 100644 --- a/src/plugins/qnx/blackberrycreatepackagestep.cpp +++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp @@ -187,7 +187,7 @@ static bool addQtAssets(BarDescriptorAssetList &assetList, BlackBerryQtVersion * it != qtFolders.constEnd(); ++it) { const QString target = it->first; const QString qtFolder = it->second; - if (QFileInfo(qtFolder).exists()) { + if (QFileInfo::exists(qtFolder)) { BarDescriptorAsset asset; asset.source = qtFolder; asset.destination = target; diff --git a/src/plugins/qnx/blackberrydeploystep.cpp b/src/plugins/qnx/blackberrydeploystep.cpp index c101ed4f72..7084a40cd7 100644 --- a/src/plugins/qnx/blackberrydeploystep.cpp +++ b/src/plugins/qnx/blackberrydeploystep.cpp @@ -114,7 +114,7 @@ void BlackBerryDeployStep::run(QFutureInterface<bool> &fi) QList<BarPackageDeployInformation> packagesToDeploy = deployConfig->deploymentInfo()->enabledPackages(); foreach (const BarPackageDeployInformation &info, packagesToDeploy) { - if (!QFileInfo(info.packagePath()).exists()) { + if (!QFileInfo::exists(info.packagePath())) { raiseError(tr("Package \"%1\" does not exist. Create the package first.").arg(info.packagePath())); fi.reportResult(false); return; diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp index 88798b4879..3c6c9345ad 100644 --- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp +++ b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp @@ -170,7 +170,7 @@ void BlackBerryDeviceConfigurationWidget::requestDebugToken() void BlackBerryDeviceConfigurationWidget::uploadDebugToken() { // check the debug token path before even laucnhing the uploader process - if (!QFileInfo(ui->debugToken->currentText()).exists()) { + if (!QFileInfo::exists(ui->debugToken->currentText())) { QMessageBox::critical(this, tr("Error"), tr("Invalid debug token path.")); return; } @@ -184,7 +184,7 @@ void BlackBerryDeviceConfigurationWidget::uploadDebugToken() void BlackBerryDeviceConfigurationWidget::updateUploadButton() { const QString path = ui->debugToken->currentText(); - ui->uploadButton->setEnabled(QFileInfo(path).exists()); + ui->uploadButton->setEnabled(QFileInfo::exists(path)); } void BlackBerryDeviceConfigurationWidget::uploadFinished(int status) diff --git a/src/plugins/qnx/blackberryrunconfiguration.cpp b/src/plugins/qnx/blackberryrunconfiguration.cpp index b8dc7928fa..bd787b39f7 100644 --- a/src/plugins/qnx/blackberryrunconfiguration.cpp +++ b/src/plugins/qnx/blackberryrunconfiguration.cpp @@ -123,7 +123,7 @@ bool BlackBerryRunConfiguration::fromMap(const QVariantMap &map) return false; m_proFilePath = map.value(QLatin1String(Constants::QNX_PROFILEPATH_KEY)).toString(); - if (m_proFilePath.isEmpty() || !QFileInfo(m_proFilePath).exists()) + if (m_proFilePath.isEmpty() || !QFileInfo::exists(m_proFilePath)) return false; init(); diff --git a/src/plugins/qnx/blackberrysetupwidget.cpp b/src/plugins/qnx/blackberrysetupwidget.cpp index df949aaed0..d4146b19fb 100644 --- a/src/plugins/qnx/blackberrysetupwidget.cpp +++ b/src/plugins/qnx/blackberrysetupwidget.cpp @@ -234,7 +234,7 @@ void SigningKeysSetupItem::validate() set(Error, tr("Found legacy BlackBerry signing keys."), tr("Update")); else if (!utils.hasRegisteredKeys()) set(Error, tr("Cannot find BlackBerry signing keys."), tr("Request")); - else if (!QFileInfo(BlackBerryConfigurationManager::instance()->defaultKeystorePath()).exists()) + else if (!QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath())) set(Error, tr("Cannot find developer certificate."), tr("Create")); else if (utils.defaultCertificateOpeningStatus() != BlackBerrySigningUtils::Opened) set(Info, tr("Developer certificate is not opened."), tr("Open")); @@ -249,7 +249,7 @@ void SigningKeysSetupItem::fix() QDesktopServices::openUrl(QUrl(QLatin1String(Qnx::Constants::QNX_LEGACY_KEYS_URL))); } else if (!utils.hasRegisteredKeys()) { QDesktopServices::openUrl(QUrl(QLatin1String(Qnx::Constants::QNX_REGISTER_KEYS_URL))); - } else if (!QFileInfo(BlackBerryConfigurationManager::instance()->defaultKeystorePath()).exists()) { + } else if (!QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath())) { set(Info, tr("Opening certificate...")); utils.createCertificate(); } else if (utils.defaultCertificateOpeningStatus() != BlackBerrySigningUtils::Opened) { diff --git a/src/plugins/qnx/blackberrysigningutils.cpp b/src/plugins/qnx/blackberrysigningutils.cpp index bcc122063c..b579ef62c0 100644 --- a/src/plugins/qnx/blackberrysigningutils.cpp +++ b/src/plugins/qnx/blackberrysigningutils.cpp @@ -69,23 +69,17 @@ BlackBerrySigningUtils::BlackBerrySigningUtils(QObject *parent) : bool BlackBerrySigningUtils::hasRegisteredKeys() { - QFileInfo cskFile(BlackBerryConfigurationManager::instance()->idTokenPath()); - - return cskFile.exists(); + return QFileInfo::exists(BlackBerryConfigurationManager::instance()->idTokenPath()); } bool BlackBerrySigningUtils::hasLegacyKeys() { - QFileInfo cskFile(BlackBerryConfigurationManager::instance()->barsignerCskPath()); - - return cskFile.exists(); + return QFileInfo::exists(BlackBerryConfigurationManager::instance()->barsignerCskPath()); } bool BlackBerrySigningUtils::hasDefaultCertificate() { - QFileInfo keystore(BlackBerryConfigurationManager::instance()->defaultKeystorePath()); - - return keystore.exists(); + return QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath()); } QString BlackBerrySigningUtils::cskPassword(QWidget *passwordPromptParent, bool *ok) diff --git a/src/plugins/qnx/qnxutils.cpp b/src/plugins/qnx/qnxutils.cpp index 549a2840e8..3596880319 100644 --- a/src/plugins/qnx/qnxutils.cpp +++ b/src/plugins/qnx/qnxutils.cpp @@ -93,7 +93,7 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString { QList <Utils::EnvironmentItem> items; - if (!QFileInfo(fileName).exists()) + if (!QFileInfo::exists(fileName)) return items; const bool isWindows = Utils::HostOsInfo::isWindowsHost(); @@ -157,7 +157,7 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString bool QnxUtils::isValidNdkPath(const QString &ndkPath) { - return (QFileInfo(envFilePath(ndkPath)).exists()); + return QFileInfo::exists(envFilePath(ndkPath)); } QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersion) @@ -168,7 +168,7 @@ QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersi else if (Utils::HostOsInfo::isAnyUnixHost()) envFile = ndkPath + QLatin1String("/bbndk-env.sh"); - if (!QFileInfo(envFile).exists()) { + if (!QFileInfo::exists(envFile)) { QString version = targetVersion.isEmpty() ? defaultTargetVersion(ndkPath) : targetVersion; version = version.replace(QLatin1Char('.'), QLatin1Char('_')); if (Utils::HostOsInfo::isWindowsHost()) @@ -268,7 +268,7 @@ QString QnxUtils::sdkInstallerPath(const QString &ndkPath) { QString sdkinstallPath = Utils::HostOsInfo::withExecutableSuffix(ndkPath + QLatin1String("/qde")); - if (QFileInfo(sdkinstallPath).exists()) + if (QFileInfo::exists(sdkinstallPath)) return sdkinstallPath; return QString(); diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 423f79da1c..0acdc2adfb 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1016,35 +1016,30 @@ void BaseQtVersion::updateVersionInfo() const // Now check for a qt that is configured with a prefix but not installed QString installDir = qmakeProperty(m_versionInfo, "QT_HOST_BINS"); if (!installDir.isNull()) { - QFileInfo fi(installDir); - if (!fi.exists()) + if (!QFileInfo::exists(installDir)) m_installed = false; } // Framework builds for Qt 4.8 don't use QT_INSTALL_HEADERS // so we don't check on mac if (!HostOsInfo::isMacHost()) { if (!qtHeaderData.isNull()) { - const QFileInfo fi(qtHeaderData); - if (!fi.exists()) + if (!QFileInfo::exists(qtHeaderData)) m_installed = false; } } const QString qtInstallDocs = qmakeProperty(m_versionInfo, "QT_INSTALL_DOCS"); if (!qtInstallDocs.isNull()) { - const QFileInfo fi(qtInstallDocs); - if (fi.exists()) + if (QFileInfo::exists(qtInstallDocs)) m_hasDocumentation = true; } const QString qtInstallExamples = qmakeProperty(m_versionInfo, "QT_INSTALL_EXAMPLES"); if (!qtInstallExamples.isNull()) { - const QFileInfo fi(qtInstallExamples); - if (fi.exists()) + if (QFileInfo::exists(qtInstallExamples)) m_hasExamples = true; } const QString qtInstallDemos = qmakeProperty(m_versionInfo, "QT_INSTALL_DEMOS"); if (!qtInstallDemos.isNull()) { - const QFileInfo fi(qtInstallDemos); - if (fi.exists()) + if (QFileInfo::exists(qtInstallDemos)) m_hasDemos = true; } m_qtVersionString = qmakeProperty(m_versionInfo, "QT_VERSION"); @@ -1406,7 +1401,7 @@ FileName BaseQtVersion::mkspecFromVersionInfo(const QHash<QString, QString> &ver QString possibleFullPath = QString::fromLocal8Bit(temp.at(1).trimmed().constData()); // We sometimes get a mix of different slash styles here... possibleFullPath = possibleFullPath.replace(QLatin1Char('\\'), QLatin1Char('/')); - if (QFileInfo(possibleFullPath).exists()) // Only if the path exists + if (QFileInfo::exists(possibleFullPath)) // Only if the path exists mkspecFullPath = FileName::fromUserInput(possibleFullPath); } break; diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index 653780a299..45b46ff01f 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -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()) { diff --git a/src/plugins/todo/todoplugin.cpp b/src/plugins/todo/todoplugin.cpp index 9099ddfc62..4922e564ae 100755 --- a/src/plugins/todo/todoplugin.cpp +++ b/src/plugins/todo/todoplugin.cpp @@ -97,7 +97,7 @@ void TodoPlugin::scanningScopeChanged(ScanningScope scanningScope) void TodoPlugin::todoItemClicked(const TodoItem &item) { - if (QFileInfo(item.file).exists()) { + if (QFileInfo::exists(item.file)) { Core::IEditor *editor = Core::EditorManager::openEditor(item.file); editor->gotoLine(item.line); } diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index dfd7d5dcb7..8252e4ba2c 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -102,7 +102,7 @@ QString ProFileEvaluator::sysrootify(const QString &path, const QString &baseDir const bool isHostSystemPath = option->sysroot.isEmpty() || path.startsWith(option->sysroot, cs) || path.startsWith(baseDir, cs) || path.startsWith(d->m_outputDir, cs) - || !QFileInfo(option->sysroot + path).exists(); + || !QFileInfo::exists(option->sysroot + path); return isHostSystemPath ? path : option->sysroot + path; } diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index 1190b0afce..6239816ed7 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -1895,7 +1895,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( } #ifdef QMAKE_BUILTIN_PRFS fn.prepend(QLatin1String(":/qmake/features/")); - if (QFileInfo(fn).exists()) + if (QFileInfo::exists(fn)) goto cool; #endif fn = QLatin1String(""); // Indicate failed lookup. See comment above. |