Set up QML file provider settings within the FileProviderSettingsController

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-05-18 13:49:22 +08:00
parent 8643acfdaa
commit a6f15ea700
No known key found for this signature in database
GPG Key ID: C839200C384636B0
2 changed files with 18 additions and 2 deletions

View File

@ -14,15 +14,27 @@
#include "fileprovidersettingscontroller.h"
namespace {
constexpr auto fpSettingsQmlPath = "qrc:/qml/src/gui/macOS/ui/FileProviderSettings.qml";
}
namespace OCC {
namespace Mac {
FileProviderSettingsController::FileProviderSettingsController(QObject *parent)
: QObject{parent}
, _settingsView(QUrl(fpSettingsQmlPath))
{
}
QQuickView* FileProviderSettingsController::settingsView()
{
return &_settingsView;
}
} // Mac
} // OCC

View File

@ -16,10 +16,8 @@
#include <QObject>
#include <QQuickView>
#include <QWidget>
class QQuickView;
class QWidget;
namespace OCC {
@ -29,9 +27,15 @@ class FileProviderSettingsController : public QObject
{
Q_OBJECT
Q_PROPERTY(QQuickView* settingsView READ settingsView CONSTANT)
public:
explicit FileProviderSettingsController(QObject *parent = nullptr);
[[nodiscard]] QQuickView* settingsView();
private:
QQuickView _settingsView;
};
} // Mac