**Artist portrait**
- Fix CDN URL: images.portrait.{hash,format} →
https://static.qobuz.com/images/artists/covers/large/{hash}.{format}
**Section alignment**
- Qt::ToolButtonTextOnly on all section toggles so text is truly left-aligned
**Auth 401 race condition**
- qobuz_backend_set_token now uses blocking_lock() instead of spawning an
async task, guaranteeing the token is set before any subsequent API call
**Pagination (infinite scroll)**
- Release sections load 50 at a time (was 500)
- ArtistSection tracks has_more + loaded count; scrolling to the bottom
emits loadMoreRequested → ArtistView calls getArtistReleases(offset=N)
- AlbumListView gains addAlbums() for append; setReleases routes to
setAlbums (offset=0) or appendAlbums (offset>0)
**Back/Forward navigation**
- MainToolBar exposes Back/Forward QActions (go-previous/go-next icons)
- MainWindow keeps a NavPage vector + index; pushNav() on every album/artist
navigation; goBack/goForward re-navigate without pushing history
**Context menu on now-playing label**
- Right-click on track label in toolbar → "Go to Album" / "Go to Artist"
- MainToolBar stores current track; emits albumRequested/artistRequested
signals wired to MainWindow's existing handlers
**Artist favourites button**
- ♡ Favourite / ♥ Favourited toggle in artist header
- Calls new addFavArtist / removeFavArtist (Rust + Qt backend wiring)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
396 lines
15 KiB
C++
396 lines
15 KiB
C++
/****************************************************************************
|
|
** Meta object code from reading C++ file 'qobuzbackend.hpp'
|
|
**
|
|
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.10.2)
|
|
**
|
|
** WARNING! All changes made in this file will be lost!
|
|
*****************************************************************************/
|
|
|
|
#include "../../../src/backend/qobuzbackend.hpp"
|
|
#include <QtCore/qmetatype.h>
|
|
|
|
#include <QtCore/qtmochelpers.h>
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <QtCore/qxptype_traits.h>
|
|
#if !defined(Q_MOC_OUTPUT_REVISION)
|
|
#error "The header file 'qobuzbackend.hpp' doesn't include <QObject>."
|
|
#elif Q_MOC_OUTPUT_REVISION != 69
|
|
#error "This file was generated using the moc from 6.10.2. It"
|
|
#error "cannot be used with the include files from this version of Qt."
|
|
#error "(The moc has changed too much.)"
|
|
#endif
|
|
|
|
#ifndef Q_CONSTINIT
|
|
#define Q_CONSTINIT
|
|
#endif
|
|
|
|
QT_WARNING_PUSH
|
|
QT_WARNING_DISABLE_DEPRECATED
|
|
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
|
|
namespace {
|
|
struct qt_meta_tag_ZN12QobuzBackendE_t {};
|
|
} // unnamed namespace
|
|
|
|
template <> constexpr inline auto QobuzBackend::qt_create_metaobjectdata<qt_meta_tag_ZN12QobuzBackendE_t>()
|
|
{
|
|
namespace QMC = QtMocConstants;
|
|
QtMocHelpers::StringRefStorage qt_stringData {
|
|
"QobuzBackend",
|
|
"loginSuccess",
|
|
"",
|
|
"token",
|
|
"QJsonObject",
|
|
"user",
|
|
"loginError",
|
|
"error",
|
|
"userLoaded",
|
|
"searchResult",
|
|
"result",
|
|
"albumLoaded",
|
|
"album",
|
|
"artistLoaded",
|
|
"artist",
|
|
"playlistLoaded",
|
|
"playlist",
|
|
"playlistCreated",
|
|
"playlistDeleted",
|
|
"playlistTrackAdded",
|
|
"playlistId",
|
|
"favTracksLoaded",
|
|
"favAlbumsLoaded",
|
|
"favArtistsLoaded",
|
|
"userPlaylistsLoaded",
|
|
"trackChanged",
|
|
"track",
|
|
"stateChanged",
|
|
"state",
|
|
"positionChanged",
|
|
"position",
|
|
"duration",
|
|
"trackFinished",
|
|
"message",
|
|
"onEvent",
|
|
"eventType",
|
|
"json",
|
|
"onPositionTick"
|
|
};
|
|
|
|
QtMocHelpers::UintData qt_methods {
|
|
// Signal 'loginSuccess'
|
|
QtMocHelpers::SignalData<void(const QString &, const QJsonObject &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::QString, 3 }, { 0x80000000 | 4, 5 },
|
|
}}),
|
|
// Signal 'loginError'
|
|
QtMocHelpers::SignalData<void(const QString &)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::QString, 7 },
|
|
}}),
|
|
// Signal 'userLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(8, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 5 },
|
|
}}),
|
|
// Signal 'searchResult'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'albumLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(11, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 12 },
|
|
}}),
|
|
// Signal 'artistLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(13, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 14 },
|
|
}}),
|
|
// Signal 'playlistLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(15, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 16 },
|
|
}}),
|
|
// Signal 'playlistCreated'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(17, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 16 },
|
|
}}),
|
|
// Signal 'playlistDeleted'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(18, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'playlistTrackAdded'
|
|
QtMocHelpers::SignalData<void(qint64)>(19, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::LongLong, 20 },
|
|
}}),
|
|
// Signal 'favTracksLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(21, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'favAlbumsLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(22, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'favArtistsLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(23, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'userPlaylistsLoaded'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(24, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 10 },
|
|
}}),
|
|
// Signal 'trackChanged'
|
|
QtMocHelpers::SignalData<void(const QJsonObject &)>(25, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ 0x80000000 | 4, 26 },
|
|
}}),
|
|
// Signal 'stateChanged'
|
|
QtMocHelpers::SignalData<void(const QString &)>(27, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::QString, 28 },
|
|
}}),
|
|
// Signal 'positionChanged'
|
|
QtMocHelpers::SignalData<void(quint64, quint64)>(29, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::ULongLong, 30 }, { QMetaType::ULongLong, 31 },
|
|
}}),
|
|
// Signal 'trackFinished'
|
|
QtMocHelpers::SignalData<void()>(32, 2, QMC::AccessPublic, QMetaType::Void),
|
|
// Signal 'error'
|
|
QtMocHelpers::SignalData<void(const QString &)>(7, 2, QMC::AccessPublic, QMetaType::Void, {{
|
|
{ QMetaType::QString, 33 },
|
|
}}),
|
|
// Slot 'onEvent'
|
|
QtMocHelpers::SlotData<void(int, const QString &)>(34, 2, QMC::AccessPrivate, QMetaType::Void, {{
|
|
{ QMetaType::Int, 35 }, { QMetaType::QString, 36 },
|
|
}}),
|
|
// Slot 'onPositionTick'
|
|
QtMocHelpers::SlotData<void()>(37, 2, QMC::AccessPrivate, QMetaType::Void),
|
|
};
|
|
QtMocHelpers::UintData qt_properties {
|
|
};
|
|
QtMocHelpers::UintData qt_enums {
|
|
};
|
|
return QtMocHelpers::metaObjectData<QobuzBackend, qt_meta_tag_ZN12QobuzBackendE_t>(QMC::MetaObjectFlag{}, qt_stringData,
|
|
qt_methods, qt_properties, qt_enums);
|
|
}
|
|
Q_CONSTINIT const QMetaObject QobuzBackend::staticMetaObject = { {
|
|
QMetaObject::SuperData::link<QObject::staticMetaObject>(),
|
|
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12QobuzBackendE_t>.stringdata,
|
|
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12QobuzBackendE_t>.data,
|
|
qt_static_metacall,
|
|
nullptr,
|
|
qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12QobuzBackendE_t>.metaTypes,
|
|
nullptr
|
|
} };
|
|
|
|
void QobuzBackend::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
|
{
|
|
auto *_t = static_cast<QobuzBackend *>(_o);
|
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
|
switch (_id) {
|
|
case 0: _t->loginSuccess((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[2]))); break;
|
|
case 1: _t->loginError((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
|
|
case 2: _t->userLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 3: _t->searchResult((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 4: _t->albumLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 5: _t->artistLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 6: _t->playlistLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 7: _t->playlistCreated((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 8: _t->playlistDeleted((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 9: _t->playlistTrackAdded((*reinterpret_cast<std::add_pointer_t<qint64>>(_a[1]))); break;
|
|
case 10: _t->favTracksLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 11: _t->favAlbumsLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 12: _t->favArtistsLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 13: _t->userPlaylistsLoaded((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 14: _t->trackChanged((*reinterpret_cast<std::add_pointer_t<QJsonObject>>(_a[1]))); break;
|
|
case 15: _t->stateChanged((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
|
|
case 16: _t->positionChanged((*reinterpret_cast<std::add_pointer_t<quint64>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<quint64>>(_a[2]))); break;
|
|
case 17: _t->trackFinished(); break;
|
|
case 18: _t->error((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
|
|
case 19: _t->onEvent((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2]))); break;
|
|
case 20: _t->onPositionTick(); break;
|
|
default: ;
|
|
}
|
|
}
|
|
if (_c == QMetaObject::IndexOfMethod) {
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QString & , const QJsonObject & )>(_a, &QobuzBackend::loginSuccess, 0))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QString & )>(_a, &QobuzBackend::loginError, 1))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::userLoaded, 2))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::searchResult, 3))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::albumLoaded, 4))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::artistLoaded, 5))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::playlistLoaded, 6))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::playlistCreated, 7))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::playlistDeleted, 8))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(qint64 )>(_a, &QobuzBackend::playlistTrackAdded, 9))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::favTracksLoaded, 10))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::favAlbumsLoaded, 11))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::favArtistsLoaded, 12))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::userPlaylistsLoaded, 13))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QJsonObject & )>(_a, &QobuzBackend::trackChanged, 14))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QString & )>(_a, &QobuzBackend::stateChanged, 15))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(quint64 , quint64 )>(_a, &QobuzBackend::positionChanged, 16))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)()>(_a, &QobuzBackend::trackFinished, 17))
|
|
return;
|
|
if (QtMocHelpers::indexOfMethod<void (QobuzBackend::*)(const QString & )>(_a, &QobuzBackend::error, 18))
|
|
return;
|
|
}
|
|
}
|
|
|
|
const QMetaObject *QobuzBackend::metaObject() const
|
|
{
|
|
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
|
}
|
|
|
|
void *QobuzBackend::qt_metacast(const char *_clname)
|
|
{
|
|
if (!_clname) return nullptr;
|
|
if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12QobuzBackendE_t>.strings))
|
|
return static_cast<void*>(this);
|
|
return QObject::qt_metacast(_clname);
|
|
}
|
|
|
|
int QobuzBackend::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
|
{
|
|
_id = QObject::qt_metacall(_c, _id, _a);
|
|
if (_id < 0)
|
|
return _id;
|
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
|
if (_id < 21)
|
|
qt_static_metacall(this, _c, _id, _a);
|
|
_id -= 21;
|
|
}
|
|
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
|
if (_id < 21)
|
|
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
|
_id -= 21;
|
|
}
|
|
return _id;
|
|
}
|
|
|
|
// SIGNAL 0
|
|
void QobuzBackend::loginSuccess(const QString & _t1, const QJsonObject & _t2)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1, _t2);
|
|
}
|
|
|
|
// SIGNAL 1
|
|
void QobuzBackend::loginError(const QString & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 2
|
|
void QobuzBackend::userLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 3
|
|
void QobuzBackend::searchResult(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 4
|
|
void QobuzBackend::albumLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 5
|
|
void QobuzBackend::artistLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 5, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 6
|
|
void QobuzBackend::playlistLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 7
|
|
void QobuzBackend::playlistCreated(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 7, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 8
|
|
void QobuzBackend::playlistDeleted(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 8, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 9
|
|
void QobuzBackend::playlistTrackAdded(qint64 _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 9, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 10
|
|
void QobuzBackend::favTracksLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 10, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 11
|
|
void QobuzBackend::favAlbumsLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 11, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 12
|
|
void QobuzBackend::favArtistsLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 12, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 13
|
|
void QobuzBackend::userPlaylistsLoaded(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 13, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 14
|
|
void QobuzBackend::trackChanged(const QJsonObject & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 14, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 15
|
|
void QobuzBackend::stateChanged(const QString & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 15, nullptr, _t1);
|
|
}
|
|
|
|
// SIGNAL 16
|
|
void QobuzBackend::positionChanged(quint64 _t1, quint64 _t2)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 16, nullptr, _t1, _t2);
|
|
}
|
|
|
|
// SIGNAL 17
|
|
void QobuzBackend::trackFinished()
|
|
{
|
|
QMetaObject::activate(this, &staticMetaObject, 17, nullptr);
|
|
}
|
|
|
|
// SIGNAL 18
|
|
void QobuzBackend::error(const QString & _t1)
|
|
{
|
|
QMetaObject::activate<void>(this, &staticMetaObject, 18, nullptr, _t1);
|
|
}
|
|
QT_WARNING_POP
|