diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 0a0a56d31dd..5138010fb04 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1011,12 +1011,6 @@ bool FilePath::isChildOf(const FilePath &s) const return m_data.at(s.m_data.size()) == QLatin1Char('/'); } -/// \overload -bool FilePath::isChildOf(const QDir &dir) const -{ - return isChildOf(FilePath::fromString(dir.absolutePath())); -} - /// \returns whether FilePath startsWith \a s bool FilePath::startsWith(const QString &s) const { diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h index 4bee82f44ed..129bdf76c86 100644 --- a/src/libs/utils/filepath.h +++ b/src/libs/utils/filepath.h @@ -180,7 +180,6 @@ public: [[nodiscard]] QDir toDir() const; // Avoid. [[nodiscard]] FilePath absolutePath() const; // Avoid. Use resolvePath(...)[.parent()] with proper base. [[nodiscard]] FilePath absoluteFilePath() const; // Avoid. Use resolvePath(...) with proper base. - [[nodiscard]] bool isChildOf(const QDir &dir) const; // Avoid. Use isChildOf(FilePath). private: friend class ::tst_fileutils; diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 34aed64b882..8b783ec4ef5 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -51,10 +51,6 @@ using namespace ResourceEditor; using namespace ResourceEditor::Internal; -/****************************************************************************** -** File -*/ - File::File(Prefix *prefix, const QString &_name, const QString &_alias) : Node(this, prefix) , name(_name) @@ -843,7 +839,7 @@ bool ResourceModel::setData(const QModelIndex &index, const QVariant &value, int if (newFileName.isEmpty()) return false; - if (!newFileName.isChildOf(baseDir)) + if (!newFileName.isChildOf(filePath().absolutePath())) return false; return renameFile(file(index), newFileName.toString());