Use override
This commit is contained in:
@@ -41,7 +41,7 @@ namespace {
|
||||
|
||||
class CollectionBackendTest : public ::testing::Test {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
database_.reset(new MemoryDatabase(nullptr));
|
||||
backend_.reset(new CollectionBackend);
|
||||
backend_->Init(database_.get(), Song::Source_Collection, SCollection::kSongsTable, SCollection::kDirsTable, SCollection::kSubdirsTable, SCollection::kFtsTable);
|
||||
@@ -146,7 +146,7 @@ TEST_F(CollectionBackendTest, GetAlbumArtNonExistent) {
|
||||
// Test adding a single song to the database, then getting various information back about it.
|
||||
class SingleSong : public CollectionBackendTest {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
CollectionBackendTest::SetUp();
|
||||
|
||||
// Add a directory - this will get ID 1
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace {
|
||||
|
||||
class CollectionModelTest : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
database_.reset(new MemoryDatabase(nullptr));
|
||||
backend_.reset(new CollectionBackend);
|
||||
backend_->Init(database_.get(), Song::Source_Collection, SCollection::kSongsTable, SCollection::kDirsTable, SCollection::kSubdirsTable, SCollection::kFtsTable);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class LoggingEnvironment : public ::testing::Environment {
|
||||
public:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
logging::Init();
|
||||
logging::SetLevels("*:4");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
class MergedProxyModelTest : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
merged_.setSourceModel(&source_);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
class MetatypesEnvironment : public ::testing::Environment {
|
||||
public:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
qRegisterMetaType<Directory>("Directory");
|
||||
qRegisterMetaType<DirectoryList>("DirectoryList");
|
||||
qRegisterMetaType<Subdirectory>("Subdirectory");
|
||||
|
||||
@@ -44,7 +44,7 @@ class RequestForUrlMatcher : public MatcherInterface<const QNetworkRequest&> {
|
||||
RequestForUrlMatcher(const QString& contains, const QMap<QString, QString>& expected_params)
|
||||
: contains_(contains), expected_params_(expected_params) {}
|
||||
|
||||
virtual ~RequestForUrlMatcher() {}
|
||||
~RequestForUrlMatcher() override {}
|
||||
|
||||
virtual bool Matches(const QNetworkRequest& req) const {
|
||||
const QUrl& url = req.url();
|
||||
@@ -62,12 +62,12 @@ class RequestForUrlMatcher : public MatcherInterface<const QNetworkRequest&> {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool MatchAndExplain(const QNetworkRequest& req, MatchResultListener* listener) const {
|
||||
bool MatchAndExplain(const QNetworkRequest& req, MatchResultListener* listener) const override {
|
||||
*listener << "which is " << req.url().toString().toUtf8().constData();
|
||||
return Matches(req);
|
||||
}
|
||||
|
||||
virtual void DescribeTo(::std::ostream* os) const {
|
||||
void DescribeTo(::std::ostream* os) const override {
|
||||
*os << "matches url";
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ class MockNetworkReply : public QNetworkReply {
|
||||
|
||||
protected:
|
||||
MOCK_METHOD0(abort, void());
|
||||
virtual qint64 readData(char* data, qint64);
|
||||
virtual qint64 writeData(const char* data, qint64);
|
||||
qint64 readData(char* data, qint64) override;
|
||||
qint64 writeData(const char* data, qint64) override;
|
||||
|
||||
QByteArray data_;
|
||||
qint64 pos_;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class ResourcesEnvironment : public ::testing::Environment {
|
||||
public:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
Q_INIT_RESOURCE(data);
|
||||
Q_INIT_RESOURCE(translations);
|
||||
Q_INIT_RESOURCE(testdata);
|
||||
|
||||
@@ -38,7 +38,7 @@ class SongPlaylistItemTest : public ::testing::TestWithParam<const char*> {
|
||||
protected:
|
||||
SongPlaylistItemTest() : temp_file_(GetParam()) {}
|
||||
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
// SongPlaylistItem::Url() checks if the file exists, so we need a real file
|
||||
temp_file_.open();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user