mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Fix sending of DeviceProfileInfo
Due to some errors within DeviceProfile and how nullables were serialized, an invalid request was made and the /Sessions/Capabilities/Full would give an 400 response back. Besides that, ApiClient would generate a DeviceProfile before all properties from QML were read. This has been fixed by implementing QQmlParserStatus and only generating the device profile after all properties are set.
This commit is contained in:
parent
8a9cb73686
commit
357ac89330
198 changed files with 5889 additions and 1761 deletions
|
@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <QHostInfo>
|
||||
#include <QObject>
|
||||
#include <QQmlListProperty>
|
||||
#include <QQmlParserStatus>
|
||||
#include <QScopedPointer>
|
||||
#include <QString>
|
||||
#include <QSysInfo>
|
||||
|
@ -85,10 +86,11 @@ class ApiClientPrivate;
|
|||
*
|
||||
* These steps might change. I'm considering decoupling CredentialsManager from this class to clean some code up.
|
||||
*/
|
||||
class ApiClient : public QObject {
|
||||
class ApiClient : public QObject, public QQmlParserStatus {
|
||||
friend class WebSocket;
|
||||
friend class PlaybackManager;
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QQmlParserStatus)
|
||||
Q_DECLARE_PRIVATE(ApiClient);
|
||||
public:
|
||||
explicit ApiClient(QObject *parent = nullptr);
|
||||
|
@ -240,6 +242,9 @@ protected slots:
|
|||
void credManagerUsersListed(const QString &server, QStringList users);
|
||||
void credManagerTokenRetrieved(const QString &server, const QString &user, const QString &token);
|
||||
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Adds default headers to each request, like authentication headers etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue