mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
Add OVERRIDE macro like Java's @Override.
This commit is contained in:
parent
0827865804
commit
09d37aaa01
22
ext/libclementine-common/core/override.h
Normal file
22
ext/libclementine-common/core/override.h
Normal file
@ -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 <features.h>
|
||||
# if __GNUC_PREREQ(4,7)
|
||||
# define OVERRIDE override
|
||||
# else
|
||||
# define OVERRIDE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // OVERRIDE_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);
|
||||
|
Loading…
Reference in New Issue
Block a user