diff options
Diffstat (limited to 'src/libs/installer/fileutils.h')
-rw-r--r-- | src/libs/installer/fileutils.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libs/installer/fileutils.h b/src/libs/installer/fileutils.h index ac3f95098..3c995937c 100644 --- a/src/libs/installer/fileutils.h +++ b/src/libs/installer/fileutils.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -49,12 +49,12 @@ enum DefaultFilePermissions { Executable = 0x7755 }; -class INSTALLER_EXPORT TempDirDeleter +class INSTALLER_EXPORT TempPathDeleter { public: - explicit TempDirDeleter(const QString &path); - explicit TempDirDeleter(const QStringList &paths = QStringList()); - ~TempDirDeleter(); + explicit TempPathDeleter(const QString &path); + explicit TempPathDeleter(const QStringList &paths = QStringList()); + ~TempPathDeleter(); QStringList paths() const; @@ -65,7 +65,7 @@ public: void releaseAndDelete(const QString &path); private: - Q_DISABLE_COPY(TempDirDeleter) + Q_DISABLE_COPY(TempPathDeleter) QSet<QString> m_paths; }; @@ -89,11 +89,15 @@ private: void INSTALLER_EXPORT mkdir(const QString &path); void INSTALLER_EXPORT mkpath(const QString &path); + bool INSTALLER_EXPORT createDirectoryWithParents(const QString &path); +#ifdef Q_OS_MACOS + void INSTALLER_EXPORT mkalias(const QString &path, const QString &alias); +#endif quint64 INSTALLER_EXPORT fileSize(const QFileInfo &info); bool INSTALLER_EXPORT isInBundle(const QString &path, QString *bundlePath = 0); - QString replacePath(const QString &path, const QString &pathBefore, const QString &pathAfter); + QString replacePath(const QString &path, const QString &pathBefore, const QString &pathAfter, bool cleanPath = true); void replaceHighDpiImage(QString &imagePath); void INSTALLER_EXPORT trimmedCopyConfigData(const QString &source, const QString &target, const QStringList &elementsToRemoveTags); |