From 894322a3a1d9c098a76cf2eec97a05f30a74dfe9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 18 Aug 2018 08:11:48 +0200 Subject: Hopefully fixed file dialogs on mac. There seems to be a problem with setting visible=true before the component is completed. The dialog doesn't have to wrapped in a component anyways, and we can just show it using open. --- accounts/maildir/qml/AccountSettings.qml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'accounts/maildir') diff --git a/accounts/maildir/qml/AccountSettings.qml b/accounts/maildir/qml/AccountSettings.qml index 9553135b..44713b00 100644 --- a/accounts/maildir/qml/AccountSettings.qml +++ b/accounts/maildir/qml/AccountSettings.qml @@ -82,22 +82,18 @@ Item { iconName: Kube.Icons.folder onClicked: { - fileDialogComponent.createObject(parent) + fileDialog.open() } - Component { - id: fileDialogComponent - Dialogs.FileDialog { - id: fileDialog - - visible: true - title: "Choose the maildir folder" - - selectFolder: true - - onAccepted: { - maildirSettings.path = fileDialog.fileUrl - } + Dialogs.FileDialog { + id: fileDialog + title: qsTr("Choose a maildir folder") + folder: shortcuts.home + selectFolder: true + selectExisting: true + selectMultiple: false + onAccepted: { + maildirSettings.path = fileDialog.fileUrl } } } -- cgit v1.2.3