From cf822073113ae54b14994cb80af0cb8e786856c5 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Thu, 2 May 2019 23:17:59 +0200 Subject: Apply fix-its for the missing override keyword Missing override is a warning in clang Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f Reviewed-by: Denis Shienkov Reviewed-by: Christian Kandeler --- tests/auto/api/tst_api.cpp | 4 ++-- tests/auto/api/tst_api.h | 2 +- tests/auto/blackbox/tst_clangdb.h | 2 +- tests/benchmarker/exception.h | 6 +++--- tests/fuzzy-test/commandlineparser.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index c998b81e8..6313827fa 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -66,11 +66,11 @@ class LogSink: public qbs::ILogSink public: QString output; - void doPrintWarning(const qbs::ErrorInfo &error) { + void doPrintWarning(const qbs::ErrorInfo &error) override { qDebug("%s", qPrintable(error.toString())); warnings.push_back(error); } - void doPrintMessage(qbs::LoggerLevel, const QString &message, const QString &) { + void doPrintMessage(qbs::LoggerLevel, const QString &message, const QString &) override { output += message; } diff --git a/tests/auto/api/tst_api.h b/tests/auto/api/tst_api.h index ff32c8634..c04e9feb0 100644 --- a/tests/auto/api/tst_api.h +++ b/tests/auto/api/tst_api.h @@ -50,7 +50,7 @@ class TestApi : public QObject public: TestApi(); - ~TestApi(); + ~TestApi() override; private slots: void initTestCase(); diff --git a/tests/auto/blackbox/tst_clangdb.h b/tests/auto/blackbox/tst_clangdb.h index 6122e636d..1ae6db467 100644 --- a/tests/auto/blackbox/tst_clangdb.h +++ b/tests/auto/blackbox/tst_clangdb.h @@ -41,7 +41,7 @@ public: TestClangDb(); private slots: - void initTestCase(); + void initTestCase() override; void ensureBuildTreeCreated(); void checkCanGenerateDb(); void checkDbIsValidJson(); diff --git a/tests/benchmarker/exception.h b/tests/benchmarker/exception.h index 3771dc89d..b4df36974 100644 --- a/tests/benchmarker/exception.h +++ b/tests/benchmarker/exception.h @@ -36,13 +36,13 @@ namespace qbsBenchmarker { class Exception : public QException { public: explicit Exception(const QString &description) : m_description(description) {} - ~Exception() throw() { } + ~Exception() throw() override { } QString description() const { return m_description; } private: - void raise() const { throw *this; } - Exception *clone() const { return new Exception(*this); } + void raise() const override { throw *this; } + Exception *clone() const override { return new Exception(*this); } QString m_description; }; diff --git a/tests/fuzzy-test/commandlineparser.h b/tests/fuzzy-test/commandlineparser.h index 54b80c7cb..a000a515d 100644 --- a/tests/fuzzy-test/commandlineparser.h +++ b/tests/fuzzy-test/commandlineparser.h @@ -36,12 +36,12 @@ class ParseException : public std::exception { public: ParseException(const QString &error) : errorMessage(error) { } - ~ParseException() throw() {} + ~ParseException() throw() override {} QString errorMessage; private: - const char *what() const throw() { return qPrintable(errorMessage); } + const char *what() const throw() override { return qPrintable(errorMessage); } }; class CommandLineParser -- cgit v1.2.3