Refactoring
This commit is contained in:
@@ -26,7 +26,8 @@
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include "core/shared_ptr.h"
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "constants/subsonicsettings.h"
|
||||
#include "settings/settingspage.h"
|
||||
|
||||
class QEvent;
|
||||
@@ -38,23 +39,16 @@ class SubsonicSettingsPage : public SettingsPage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SubsonicSettingsPage(SettingsDialog *dialog, QWidget *parent = nullptr);
|
||||
explicit SubsonicSettingsPage(SettingsDialog *dialog, const SharedPtr<SubsonicService> service, QWidget *parent = nullptr);
|
||||
~SubsonicSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
enum class AuthMethod {
|
||||
Hex,
|
||||
MD5
|
||||
};
|
||||
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void Test(const QUrl &url, const QString &username, const QString &password, const SubsonicSettingsPage::AuthMethod auth_method, const bool redirect = false);
|
||||
void Test(const QUrl &url, const QString &username, const QString &password, const SubsonicSettings::AuthMethod auth_method, const bool redirect = false);
|
||||
|
||||
private Q_SLOTS:
|
||||
void TestClicked();
|
||||
@@ -63,7 +57,7 @@ class SubsonicSettingsPage : public SettingsPage {
|
||||
|
||||
private:
|
||||
Ui_SubsonicSettingsPage *ui_;
|
||||
SharedPtr<SubsonicService> service_;
|
||||
const SharedPtr<SubsonicService> service_;
|
||||
};
|
||||
|
||||
#endif // SUBSONICSETTINGSPAGE_H
|
||||
|
||||
Reference in New Issue
Block a user