Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dialog {
- id: editdialog
- property var modelID
- property bool thehell
- //FIX me Add commands Check.
- canAccept: connectionnameField.text != modelID.connection_name || usernameField.text != modelID.username || hostnameField.text != modelID.address || connectionCat.value != modelID.category || activateOnStart.checked != modelID.activate_on_start
- acceptDestinationAction: PageStackAction.Pop
- //acceptDestinationProperties: {"stopthisshit": false}
- onAccepted:{
- DBase.updateConnection(modelID.id,connectionnameField.text,usernameField.text,hostnameField.text,connectionCat.value,activateOnStart.checked,"-4")
- editdialog.thehell = false
- console.log("edited connection")
- }
- main page
- MenuItem {
- text: qsTr("Edit")
- onClicked: {
- console.log("going to edit", model.username)
- page.stopthisshit = true
- var test = pageStack.push(Qt.resolvedUrl("EditCon.qml"), {"modelID": model})
- test.accepted.connect(function() { page.stopthisshit = test.thehell } )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement