summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/shared/shared.cpp
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2021-10-30 19:30:32 +0200
committerJonas Kvinge <jonas@jkvinge.net>2021-11-01 22:43:29 +0200
commit104a81d47cf76b54b275b0427693fd1402fe9579 (patch)
treef1dea95ab553361f7e5ae0d39895679370354285 /src/macdeployqt/shared/shared.cpp
parentc9dc5e7f807a1de344f3569c0db747364c413300 (diff)
macdeployqt: Use static QFile::exists() and QFileInfo::exists()
Change-Id: If2fd409fbd53535cf4823bed831217c196a070ba Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r--src/macdeployqt/shared/shared.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index af21caa50..33fc5ffed 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -98,7 +98,7 @@ inline QDebug operator<<(QDebug debug, const ApplicationBundleInfo &info)
bool copyFilePrintStatus(const QString &from, const QString &to)
{
- if (QFile(to).exists()) {
+ if (QFile::exists(to)) {
if (alwaysOwerwriteEnabled) {
QFile(to).remove();
} else {
@@ -135,7 +135,7 @@ bool copyFilePrintStatus(const QString &from, const QString &to)
bool linkFilePrintStatus(const QString &file, const QString &link)
{
- if (QFile(link).exists()) {
+ if (QFile::exists(link)) {
if (QFile(link).symLinkTarget().isEmpty())
LogError() << link << "exists but it's a file.";
else
@@ -747,7 +747,7 @@ QString copyDylib(const FrameworkInfo &framework, const QString path)
}
// Return if the dylib has already been deployed
- if (QFileInfo(dylibDestinationBinaryPath).exists() && !alwaysOwerwriteEnabled)
+ if (QFileInfo::exists(dylibDestinationBinaryPath) && !alwaysOwerwriteEnabled)
return dylibDestinationBinaryPath;
// Copy dylib binary
@@ -814,7 +814,7 @@ QString copyFramework(const FrameworkInfo &framework, const QString path)
// Contents/Info.plist should be Versions/5/Resources/Info.plist
const QString legacyInfoPlistPath = framework.frameworkPath + "/Contents/Info.plist";
const QString correctInfoPlistPath = frameworkDestinationDirectory + "/Resources/Info.plist";
- if (QFile(legacyInfoPlistPath).exists()) {
+ if (QFile::exists(legacyInfoPlistPath)) {
copyFilePrintStatus(legacyInfoPlistPath, correctInfoPlistPath);
patch_debugInInfoPlist(correctInfoPlistPath);
}
@@ -1275,11 +1275,11 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+ "/qmlimportscanner");
// Fallback: Look relative to the macdeployqt binary
- if (!QFile(qmlImportScannerPath).exists())
+ if (!QFile::exists(qmlImportScannerPath))
qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
// Verify that we found a qmlimportscanner binary
- if (!QFile(qmlImportScannerPath).exists()) {
+ if (!QFile::exists(qmlImportScannerPath)) {
LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
LogError() << "Rebuild qtdeclarative/tools/qmlimportscanner";
return false;