diff --git a/src/gui/macOS/ui/FileProviderSettings.qml b/src/gui/macOS/ui/FileProviderSettings.qml index 8c0361f02..b4a220bea 100644 --- a/src/gui/macOS/ui/FileProviderSettings.qml +++ b/src/gui/macOS/ui/FileProviderSettings.qml @@ -24,6 +24,7 @@ Page { id: root property bool showBorder: true + property var controller: FileProviderSettingsController title: qsTr("Virtual files settings") diff --git a/src/gui/macOS/ui/fileprovidersettingscontroller_mac.mm b/src/gui/macOS/ui/fileprovidersettingscontroller_mac.mm index 7578171cd..9bd05f8d3 100644 --- a/src/gui/macOS/ui/fileprovidersettingscontroller_mac.mm +++ b/src/gui/macOS/ui/fileprovidersettingscontroller_mac.mm @@ -20,6 +20,9 @@ namespace { constexpr auto fpSettingsQmlPath = "qrc:/qml/src/gui/macOS/ui/FileProviderSettings.qml"; + +// FileProviderSettingsPage properties -- make sure they match up in QML file! +constexpr auto fpSettingsControllerProp = "FileProviderSettingsController"; } // namespace namespace OCC { @@ -35,6 +38,7 @@ FileProviderSettingsController::FileProviderSettingsController(QObject *parent) _settingsViewWidget = std::make_unique(Systray::instance()->trayEngine(), nullptr); _settingsViewWidget->setResizeMode(QQuickWidget::SizeRootObjectToView); _settingsViewWidget->setSource(QUrl(fpSettingsQmlPath)); + _settingsViewWidget->rootContext()->setContextProperty(fpSettingsControllerProp, this); } QQuickWidget *FileProviderSettingsController::settingsViewWidget()