Server settings are read from QSettings and applied if they are changed.

This commit is contained in:
2026-02-03 11:17:26 +01:00
parent d4ff1ffb61
commit 6adf18caeb
5 changed files with 37 additions and 5 deletions

View File

@ -16,6 +16,8 @@ class ServerCommunicator : public QObject {
QUrl url() const;
void setUrl(const QUrl& url);
void setServerConfiguration(const QString url, const QString email, const QString password);
public slots:
void fetchItems();
void postItems(const QByteArray& jsonData);
@ -35,6 +37,10 @@ class ServerCommunicator : public QObject {
QNetworkAccessManager m_netManager;
std::shared_ptr<QRestAccessManager> m_restManager;
std::shared_ptr<QNetworkRequestFactory> m_serviceApi;
QString m_email;
QString m_password;
// QString m_authToken;
};
#endif // SERVERCOMMUNICATOR_H