summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-11-01 13:18:55 +0100
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-11-03 13:42:35 +0100
commit57cab7b9a8cb453625ffa01589a9e0d3cd8f07d3 (patch)
treea0141323f9cec33c33e0504d967715ff9cbc46ef /tests/auto/corelib/io/qfile
parent29f86b5698fa22d5675777ae91e36be7dc530844 (diff)
QAbstractFileEngine: Remove useless method overrides
Remove useless overrides of QAbstractFileEngine methods from the derived classes. Also remove "This virtual function must be reimplemented by all subclasses" passages from the QAbstractFileEngine's documentation. There are pure virtual methods for such use cases. QAbstractFileEngine already contains useful defaults for classes not supporting all the functionality. Change-Id: Ia25965854f3809b15d7502da3749cc2f3414bbc3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index b68690cd48..46bf955bc4 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2202,35 +2202,12 @@ class MyEngine : public QAbstractFileEngine
{
public:
MyEngine(int n) { number = n; }
- virtual ~MyEngine() {}
- void setFileName(const QString &) override {}
- bool open(QIODevice::OpenMode) override { return false; }
- bool close() override { return false; }
- bool flush() override { return false; }
qint64 size() const override { return 123 + number; }
qint64 at() const { return -1; }
- bool seek(qint64) override { return false; }
- bool isSequential() const override { return false; }
- qint64 read(char *, qint64) override { return -1; }
- qint64 write(const char *, qint64) override { return -1; }
- bool remove() override { return false; }
- bool copy(const QString &) override { return false; }
- bool rename(const QString &) override { return false; }
- bool link(const QString &) override { return false; }
- bool mkdir(const QString &, bool) const override { return false; }
- bool rmdir(const QString &, bool) const override { return false; }
- bool setSize(qint64) override { return false; }
QStringList entryList(QDir::Filters, const QStringList &) const override { return QStringList(); }
- bool caseSensitive() const override { return false; }
- bool isRelativePath() const override { return false; }
- FileFlags fileFlags(FileFlags) const override { return { }; }
bool chmod(uint) { return false; }
QString fileName(FileName) const override { return name; }
- uint ownerId(FileOwner) const override { return 0; }
- QString owner(FileOwner) const override { return QString(); }
- QDateTime fileTime(FileTime) const override { return QDateTime(); }
- bool setFileTime(const QDateTime &, FileTime) override { return false; }
private:
int number;