diff --git a/src/libs/ssh/sshkeycreationdialog.cpp b/src/libs/ssh/sshkeycreationdialog.cpp index ff38fe239f72bf5e8b603e6831e89d2a9839ef68..39d36aa993c3405251e97d47ad909325a4adb7fb 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 39c3b7cfea42cb04787de8f4f1005110e589a965..a80b4aab768bc1508fa7e0770bd7024505edc886 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 895c745f2b059dea9ac8a237973875facfc146dc..cf9cd65fd947976b832adcc7286cffa0de9ee7a8 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 bb60e33ad0561bf5c68abdae6cfce034dcc15e23..f02ae1d413b68174de96846af05def6f079c4581 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 ff1841e0480b443f86208c5ba63d3304122032bb..22f0da7fa5c237561cf032d99f391576516e27ec 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 63edb321013fade06f3877761b85735a34081d71..2f92f930215d686527245298dbb695af4715c934 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 7e8450cc8571056bd913199b5b4da12f1069be8c..873c5b5debe064ab5dd5b3a782c6bdaa7d688217 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 29b1e679672bf2a2a762e2e2b38f72546c98278e..9af767c10c42c79353e0a45c0f4fac0a52f79f09 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 5db42a692698b711645f5c2158129f3fb6db7710..032a76bd29173983d2406708b84db56b3a39a1e8 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 f5b159e143d89631d72642a3a60007d22f13fb29..61a6e744dede977c1b474d139301ce6db178c3d4 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 2dd615469a4e2ca2ff6ddfea0c83a2a51426ec2a..495b202fe420031d3e879bb4168494d824283c18 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 87dd02cef25a8c7ed94805be8057240ae921abe7..0a2a98efb98ef4064ed77c09a078baef859f72d5 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 4af78e1250569918728e8b3f522cf23513bdc51a..b581f0938c721c62ba0ebbea4ded022bf6e8389d 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 cb51113d39af11e51afdf27e6ffba3539c228653..dfc1ed0d0d7e5a6e5770f11740423177e988dad9 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 8188dfbcb18368ad8ef0a86c9a428d76d2dcfa46..00750ed0d9ccb72e4383d55bf9f9c4e02314dd0d 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 59c3fe7906bd7f78c67eb2c3a7b3c7b1791155ec..979e4a00db8f21cd5b11e5f211885b1119b3d695 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 835ad44f045f642a5f616afd34594fe53b2c1f29..1147074722dd14456b4d3d0427899668181922fa 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 d7e9ccddb639504adad8eaa21efbe88a7ab0dde6..8c2b432cba2ab79c49089cba3c8260f06319f52e 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 e5ce9f2c23cd0f8b3da75648d22310124be98eba..1f559109d755d065cffa4956285ddfc39e61605c 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 d3f70b6ebe7c626e2de361f9d8e83d12e68d7609..de7f2119660ab197fe9083d7eeff6b28731e09ee 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 e9413976725b3a9acde92790ac583e9082e14bd1..ccb515b1233c92121696228c7ef828311bc8e43d 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 c1dd6ad92c57c85ac69a72a4fe7cae0d491fd618..5689471d9f495e975b2d4e487e13aa474f417e9c 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 138ea4336af8e4f78eeff606cb70b7e058f6e436..f730819b1a47dd6377dc6e332053de5c1db26394 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 d2d877ce662e1523c214e673c5e857e904b06707..6b264799b5936f72716492fa63436600bfb14669 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 104d6b41d946ae0f0f40dbd78a94f36510ed6cc6..cbf49621660ca3ce764ba673c8f3692032f77eda 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 83e5a723467f32ef4a9144ca7b07d8a996d4c4cd..55d76c1a57e5405f27812173cf1086ed0c5506a2 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 0fc02608af66dac667ed7541cd7861b844d8ae86..5fdaf2a256d23df430e03fee8c5ef9f3fb6c1b2b 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 4ebb4a2b9e433c91b7735e25f7436abec0e89d2a..9f69c18e5d8f2714212d02adb713c499be446193 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 b183f685ed9089850b56c3a6a9705cda0a6c58fa..adb7b2731a92b4474f9d40153208c5b12539e2cf 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 37f871cb2a2236d53e87d38bc1ccd404ac5a1d9d..f0eb2a96f23de51fd06ee4f5a40fc64febc6b19e 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 d2c2cc8e8d2ef022db1bfc8ff8c1b48d6e416b98..26b3a6de6dfb0950742c1ef6f8754b6830721117 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 21144337477ee102e0e64ef0de159feed6d0f87b..8b4e5d62d6bd7a443b9dd65bf2ddee7441521c4e 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 84e0c9c6bd2a44610b0d6ee237957b9a94102d61..2ac6f9b2e8b585447f0ed91ea865b89bb15a9362 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 002695840cad4f4e568a06e00dea94b49304dc4f..4d3b62747824f2396767ea19f71b9f6cfd2b0f3e 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 b7f876605c24083fa4da4b0711a8066628b43547..728f66f5cce4431b48a2dc4b055873e78db54ffb 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 0e880b4f9478e51bfbb93317f79d3abd16a21581..f8b29b58fdc9589babb133a4f3f820219b8ac5f5 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 b91a5c7eb71a1a5fdbfce069ff10eeee754ee505..d4ebebcd5667ba59d931111c57c81c6899172a5e 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 64a2e121474b2db27b2659eb059ea684c3fc893c..80a8d93445d1e2ef7868d70ff2fd2713b659d725 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 52e25b56c4dd52e3622df3af3491e26482d863d0..3d0eabf9af4dd789cbaf5b02d381d8cf33a91836 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 5634d1727d75173733cfee1c585798072a7fae70..58f2f208369effc3aeb4262d51e2947a13f178bf 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 7bb71a4e66e62644f59bf1dbe2b4047c4a7812e3..cf1abcc761242c9b7877c28f0bc8b0d65f01eb0e 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 7f649bb40788013024d977345c75cdb3e6f43a92..dd342202e31ddc8990664973170de533991273ef 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 c101ed4f725c8b0f9fd039b8652f943d0a6a3e6a..7084a40cd7d722e185c5ef5c5731791facc59904 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 88798b48790ee2b6f86841bed241a39a668569b9..3c6c9345ad76c387dee868a5a6ce64cfa407f0f3 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 b8dc7928fa77df02db65cf9ec6216cc785521af6..bd787b39f78661f469833fb15c8443b9b8ead609 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 df949aaed0c5efa4cc54e6a61991ad567800961a..d4146b19fb5ab60fa5957c9fdcb67ef4991909ac 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 bcc122063c8d6827193efcb81d7a1ca00221dc7d..b579ef62c023016ceed69edcd9b2517e0dfa4730 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 549a2840e854b6955aa577dfa16d99f6f2484a34..3596880319a7aeed5914ba0d7550b761b6c6b321 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 423f79da1cb2886a80ccd3715e8a285869d75720..0acdc2adfb0fe35092f5a8a25735bcbc58ef8892 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 653780a29903548ec0999c36cf8e4a1e5a52629c..45b46ff01f0e2fa52a3538956258293ad19dd098 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 9099ddfc62dd1a385efb93b48a3028cbf061564f..4922e564aee7e6a087ec9b7006c14794a030bc5f 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 dfd7d5dcb76ae9fc39483b57ae4fd894db43ebc6..8252e4ba2cbede80d472186614d6e3f8ee63f0b6 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 1190b0afce49e357e6bb55e261e1417341ec70b4..6239816ed7cafc0c95deadd12469949a436ee7c5 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.