summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile/tst_qfile.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-09-10 20:39:49 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-11 00:20:47 +0200
commit6ae7a02104631a2234c475575ae15ca79bef14f9 (patch)
tree5ca2db0e3aa3c7851c6d19117147c581bebeeee3 /tests/auto/corelib/io/qfile/tst_qfile.cpp
parent459e8dfdfb8ac164383c14332b2b0919f59f8b3c (diff)
Remove most compiler warnings about missing overrides
Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index b81ed67764..e5b7051997 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2181,33 +2181,33 @@ public:
MyEngine(int n) { number = n; }
virtual ~MyEngine() {}
- void setFileName(const QString &) {}
- bool open(QIODevice::OpenMode) { return false; }
- bool close() { return false; }
- bool flush() { return false; }
- qint64 size() const { return 123 + number; }
+ 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) { return false; }
- bool isSequential() const { return false; }
- qint64 read(char *, qint64) { return -1; }
- qint64 write(const char *, qint64) { return -1; }
- bool remove() { return false; }
- bool copy(const QString &) { return false; }
- bool rename(const QString &) { return false; }
- bool link(const QString &) { return false; }
- bool mkdir(const QString &, bool) const { return false; }
- bool rmdir(const QString &, bool) const { return false; }
- bool setSize(qint64) { return false; }
- QStringList entryList(QDir::Filters, const QStringList &) const { return QStringList(); }
- bool caseSensitive() const { return false; }
- bool isRelativePath() const { return false; }
- FileFlags fileFlags(FileFlags) const { return { }; }
+ 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 { return name; }
- uint ownerId(FileOwner) const { return 0; }
- QString owner(FileOwner) const { return QString(); }
- QDateTime fileTime(FileTime) const { return QDateTime(); }
- bool setFileTime(const QDateTime &, FileTime) { 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;
@@ -2217,7 +2217,7 @@ private:
class MyHandler : public QAbstractFileEngineHandler
{
public:
- inline QAbstractFileEngine *create(const QString &) const
+ inline QAbstractFileEngine *create(const QString &) const override
{
return new MyEngine(1);
}
@@ -2226,7 +2226,7 @@ public:
class MyHandler2 : public QAbstractFileEngineHandler
{
public:
- inline QAbstractFileEngine *create(const QString &) const
+ inline QAbstractFileEngine *create(const QString &) const override
{
return new MyEngine(2);
}
@@ -2257,7 +2257,7 @@ void tst_QFile::fileEngineHandler()
class MyRecursiveHandler : public QAbstractFileEngineHandler
{
public:
- inline QAbstractFileEngine *create(const QString &fileName) const
+ inline QAbstractFileEngine *create(const QString &fileName) const override
{
if (fileName.startsWith(":!")) {
QDir dir;
@@ -2671,7 +2671,7 @@ void tst_QFile::renameWithAtEndSpecialFile() const
class PeculiarAtEnd : public QFile
{
public:
- virtual bool atEnd() const
+ virtual bool atEnd() const override
{
return true;
}