Advertisement
Guest User

Untitled

a guest
Dec 21st, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. Dialog {
  2. id: editdialog
  3.  
  4. property var modelID
  5. property bool thehell
  6.  
  7. //FIX me Add commands Check.
  8. canAccept: connectionnameField.text != modelID.connection_name || usernameField.text != modelID.username || hostnameField.text != modelID.address || connectionCat.value != modelID.category || activateOnStart.checked != modelID.activate_on_start
  9.  
  10. acceptDestinationAction: PageStackAction.Pop
  11. //acceptDestinationProperties: {"stopthisshit": false}
  12.  
  13.  
  14. onAccepted:{
  15. DBase.updateConnection(modelID.id,connectionnameField.text,usernameField.text,hostnameField.text,connectionCat.value,activateOnStart.checked,"-4")
  16. editdialog.thehell = false
  17. console.log("edited connection")
  18. }
  19.  
  20.  
  21. main page
  22.  
  23. MenuItem {
  24. text: qsTr("Edit")
  25. onClicked: {
  26. console.log("going to edit", model.username)
  27. page.stopthisshit = true
  28. var test = pageStack.push(Qt.resolvedUrl("EditCon.qml"), {"modelID": model})
  29. test.accepted.connect(function() { page.stopthisshit = test.thehell } )
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement