diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-18 08:11:48 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-18 08:11:48 +0200 |
commit | 894322a3a1d9c098a76cf2eec97a05f30a74dfe9 (patch) | |
tree | 7b62c28918f7827bf91dcb3e32e37720eeb3e291 /accounts/maildir/qml/AccountSettings.qml | |
parent | 438864fa0057a0fed91431b224429e80f619d06b (diff) | |
download | kube-894322a3a1d9c098a76cf2eec97a05f30a74dfe9.tar.gz kube-894322a3a1d9c098a76cf2eec97a05f30a74dfe9.zip |
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.
Diffstat (limited to 'accounts/maildir/qml/AccountSettings.qml')
-rw-r--r-- | accounts/maildir/qml/AccountSettings.qml | 24 |
1 files changed, 10 insertions, 14 deletions
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 { | |||
82 | iconName: Kube.Icons.folder | 82 | iconName: Kube.Icons.folder |
83 | 83 | ||
84 | onClicked: { | 84 | onClicked: { |
85 | fileDialogComponent.createObject(parent) | 85 | fileDialog.open() |
86 | } | 86 | } |
87 | 87 | ||
88 | Component { | 88 | Dialogs.FileDialog { |
89 | id: fileDialogComponent | 89 | id: fileDialog |
90 | Dialogs.FileDialog { | 90 | title: qsTr("Choose a maildir folder") |
91 | id: fileDialog | 91 | folder: shortcuts.home |
92 | 92 | selectFolder: true | |
93 | visible: true | 93 | selectExisting: true |
94 | title: "Choose the maildir folder" | 94 | selectMultiple: false |
95 | 95 | onAccepted: { | |
96 | selectFolder: true | 96 | maildirSettings.path = fileDialog.fileUrl |
97 | |||
98 | onAccepted: { | ||
99 | maildirSettings.path = fileDialog.fileUrl | ||
100 | } | ||
101 | } | 97 | } |
102 | } | 98 | } |
103 | } | 99 | } |