diff --git a/ext/libclementine-common/core/override.h b/ext/libclementine-common/core/override.h new file mode 100644 index 000000000..8c348b0fd --- /dev/null +++ b/ext/libclementine-common/core/override.h @@ -0,0 +1,22 @@ +#ifndef OVERRIDE_H +#define OVERRIDE_H + +// Defines the OVERRIDE macro as C++11's override control keyword if +// it is available. + +#ifndef __has_extension + #define __has_extension(x) 0 +#endif + +#if __has_extension(cxx_override_control) // Clang feature checking macro. +# define OVERRIDE override +#elif defined(__GNUC__) // Clang also defines this. +# include +# if __GNUC_PREREQ(4,7) +# define OVERRIDE override +# else +# define OVERRIDE +# endif +#endif + +#endif // OVERRIDE_H diff --git a/src/songinfo/songkickconcerts.h b/src/songinfo/songkickconcerts.h index 84d99d019..e9cdee120 100644 --- a/src/songinfo/songkickconcerts.h +++ b/src/songinfo/songkickconcerts.h @@ -21,6 +21,7 @@ #include "songinfoprovider.h" #include "core/network.h" +#include "core/override.h" #include "internet/geolocator.h" class QNetworkReply; @@ -31,7 +32,7 @@ class SongkickConcerts : public SongInfoProvider { public: SongkickConcerts(); - void FetchInfo(int id, const Song& metadata); + void FetchInfo(int id, const Song& metadata) OVERRIDE; private slots: void ArtistSearchFinished(QNetworkReply* reply, int id);