Add custom command support #284

Merged
EaterOA merged 3 commits from master into master 2016-05-20 15:16:45 +02:00
Showing only changes of commit e94801ee02 - Show all commits

View File

@ -171,7 +171,7 @@ Tab{
checked: appSettings.useCustomCommand checked: appSettings.useCustomCommand
onCheckedChanged: appSettings.useCustomCommand = checked onCheckedChanged: appSettings.useCustomCommand = checked
} }
// workaround for QTBUG-31627 for pre 5.3.0 // Workaround for QTBUG-31627 for pre 5.3.0
Binding{ Binding{
target: useCustomCommand target: useCustomCommand
property: "checked" property: "checked"
@ -179,10 +179,16 @@ Tab{
} }
TextField{ TextField{
id: customCommand id: customCommand
anchors {left: parent.left; right: parent.right}
text: appSettings.customCommand text: appSettings.customCommand
enabled: useCustomCommand.checked enabled: useCustomCommand.checked
onEditingFinished: appSettings.customCommand = text onEditingFinished: appSettings.customCommand = text
anchors {left: parent.left; right: parent.right}
// Save text even if user forgets to press enter or unfocus
function saveSetting() {
appSettings.customCommand = text;
}
Component.onCompleted: settings_window.closing.connect(saveSetting)
} }
} }
} }