From 0b2dfd3f69582d78687c60f6bcd934b7fb087172 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 30 Oct 2022 03:44:03 +0300 Subject: [PATCH] remove unused QAbstractFileEngine methods Signed-off-by: Ivailo Monev --- package/archlinux/PKGBUILD | 2 +- src/core/io/qabstractfileengine.cpp | 52 ------------------------------------- src/core/io/qabstractfileengine.h | 7 ----- src/core/io/qabstractfileengine_p.h | 1 - 4 files changed, 1 insertion(+), 61 deletions(-) diff --git a/package/archlinux/PKGBUILD b/package/archlinux/PKGBUILD index 5d3ea7f9f..99ae3a754 100644 --- a/package/archlinux/PKGBUILD +++ b/package/archlinux/PKGBUILD @@ -3,7 +3,7 @@ # https://wiki.archlinux.org/index.php/Arch_package_guidelines pkgname=katie-git -pkgver=4.12.0.r7589.f23acad20 +pkgver=4.12.0.r7595.fabde51fe pkgrel=1 pkgdesc='C++ toolkit derived from the Qt 4.8 framework' arch=('i486' 'i686' 'pentium4' 'x86_64' 'arm') diff --git a/src/core/io/qabstractfileengine.cpp b/src/core/io/qabstractfileengine.cpp index 347f0c741..0055a5376 100644 --- a/src/core/io/qabstractfileengine.cpp +++ b/src/core/io/qabstractfileengine.cpp @@ -22,7 +22,6 @@ #include "qabstractfileengine.h" #include "qabstractfileengine_p.h" #include "qdatetime.h" -#include "qvariant.h" #include "qdebug.h" #include "qfilesystementry_p.h" #include "qfilesystemengine_p.h" @@ -560,37 +559,6 @@ bool QAbstractFileEngine::link(const QString &newName) } /*! - Requests that the directory \a dirName be created. If - \a createParentDirectories is true, then any sub-directories in \a dirName - that don't exist must be created. If \a createParentDirectories is false then - any sub-directories in \a dirName must already exist for the function to - succeed. If the operation succeeds return true; otherwise return - false. - - \sa setFileName() rmdir() isRelativePath() - */ -bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirectories) const -{ - return QFileSystemEngine::createDirectory(QFileSystemEntry(dirName), createParentDirectories); -} - -/*! - Requests that the directory \a dirName is deleted from the file - system. When \a recurseParentDirectories is true, then any empty - parent-directories in \a dirName must also be deleted. If - \a recurseParentDirectories is false, only the \a dirName leaf-node - should be deleted. In most file systems a directory cannot be deleted - using this function if it is non-empty. If the operation succeeds - return true; otherwise return false. - - \sa setFileName() remove() mkdir() isRelativePath() - */ -bool QAbstractFileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const -{ - return QFileSystemEngine::removeDirectory(QFileSystemEntry(dirName), recurseParentDirectories); -} - -/*! Requests that the file be set to size \a size. If \a size is larger than the current file then it is filled with 0's, if smaller it is simply truncated. If the operations succceeds return true; otherwise @@ -1165,24 +1133,4 @@ bool QAbstractFileEngine::open(QIODevice::OpenMode openMode, int fd, QFile::File return true; } -QString QAbstractFileEngine::currentPath(const QString &) -{ - return QFileSystemEngine::currentPath().filePath(); -} - -QString QAbstractFileEngine::homePath() -{ - return QFileSystemEngine::homePath(); -} - -QString QAbstractFileEngine::rootPath() -{ - return QFileSystemEngine::rootPath(); -} - -QString QAbstractFileEngine::tempPath() -{ - return QFileSystemEngine::tempPath(); -} - QT_END_NAMESPACE diff --git a/src/core/io/qabstractfileengine.h b/src/core/io/qabstractfileengine.h index 4bd294efc..def7944b4 100644 --- a/src/core/io/qabstractfileengine.h +++ b/src/core/io/qabstractfileengine.h @@ -96,8 +96,6 @@ public: bool copy(const QString &newName); virtual bool rename(const QString &newName); // virtual for QTemporaryFile bool link(const QString &newName); - bool mkdir(const QString &dirName, bool createParentDirectories) const; - bool rmdir(const QString &dirName, bool recurseParentDirectories) const; bool setSize(qint64 size); bool isRelativePath() const; QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const; @@ -152,11 +150,6 @@ public: //FS only!! bool open(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags); - static bool setCurrentPath(const QString &path); - static QString currentPath(const QString &path = QString()); - static QString homePath(); - static QString rootPath(); - static QString tempPath(); protected: void setError(QFile::FileError error, const QString &str); diff --git a/src/core/io/qabstractfileengine_p.h b/src/core/io/qabstractfileengine_p.h index b99273d41..c8d5c5f12 100644 --- a/src/core/io/qabstractfileengine_p.h +++ b/src/core/io/qabstractfileengine_p.h @@ -36,7 +36,6 @@ #include "QtCore/qabstractfileengine.h" #include "qfilesystementry_p.h" #include "qfilesystemmetadata_p.h" -#include "qfilesystemiterator_p.h" #include "qhash.h" QT_BEGIN_NAMESPACE -- 2.11.0