1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-23 00:09:14 +01:00

Replace Q_ENUMS with Q_ENUM

Q_ENUMS is obsolete. See: https://doc.qt.io/qt-5/qobject-obsolete.html
The replacement is Q_ENUM which was introduced in Qt 5.5, and Clementine
requires Qt 5.6.
This commit is contained in:
Jonas Kvinge 2021-07-14 01:15:27 +02:00 committed by John Maguire
parent f379ad84d4
commit daa2f25e3c
2 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,6 @@ class SubsonicLibraryScanner;
class SubsonicService : public InternetService { class SubsonicService : public InternetService {
Q_OBJECT Q_OBJECT
Q_ENUMS(LoginState)
Q_ENUMS(ApiError)
public: public:
SubsonicService(Application* app, InternetModel* parent); SubsonicService(Application* app, InternetModel* parent);
@ -63,6 +61,7 @@ class SubsonicService : public InternetService {
LoginState_RedirectLimitExceeded, LoginState_RedirectLimitExceeded,
LoginState_RedirectNoUrl, LoginState_RedirectNoUrl,
}; };
Q_ENUM(LoginState)
enum ApiError { enum ApiError {
ApiError_Generic = 0, ApiError_Generic = 0,
@ -74,6 +73,7 @@ class SubsonicService : public InternetService {
ApiError_Unlicensed = 60, ApiError_Unlicensed = 60,
ApiError_NotFound = 70, ApiError_NotFound = 70,
}; };
Q_ENUM(ApiError)
enum Type { enum Type {
Type_Artist = InternetModel::TypeCount, Type_Artist = InternetModel::TypeCount,

View File

@ -46,7 +46,6 @@ class QSettings;
class LibraryModel : public SimpleTreeModel<LibraryItem> { class LibraryModel : public SimpleTreeModel<LibraryItem> {
Q_OBJECT Q_OBJECT
Q_ENUMS(GroupBy)
public: public:
LibraryModel(std::shared_ptr<LibraryBackend> backend, Application* app, LibraryModel(std::shared_ptr<LibraryBackend> backend, Application* app,
@ -91,6 +90,7 @@ class LibraryModel : public SimpleTreeModel<LibraryItem> {
GroupBy_OriginalYearAlbum = 13, GroupBy_OriginalYearAlbum = 13,
GroupBy_OriginalYear = 14, GroupBy_OriginalYear = 14,
}; };
Q_ENUM(GroupBy)
struct Grouping { struct Grouping {
Grouping(GroupBy f = GroupBy_None, GroupBy s = GroupBy_None, Grouping(GroupBy f = GroupBy_None, GroupBy s = GroupBy_None,