Advertisement
Guest User

Untitled

a guest
Dec 7th, 2015
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. function getConnection(iden){
  2.  
  3. var con;
  4.  
  5. _connectionDBase().transaction(function(tx) {
  6. var con = tx.executeSql('SELECT id,connection_name,username,address,type,category,act_on_start,connection_commands \
  7. FROM Connections WHERE id=?', [iden]);
  8.  
  9. })
  10.  
  11. return con;
  12.  
  13. }
  14.  
  15. &&
  16.  
  17. function populateList(){
  18. for (var i=0; i<DBase.countConnections(); i++){
  19.  
  20. var component = Qt.createComponent("Connection.qml")
  21. var connection = DBase.getConnection(i)
  22. var mod = component.createObject(null, {
  23. section:"Connections",
  24. ident: connection.id,
  25. connection_name: connection.connection_name,
  26. username: connection.username,
  27. address: connection.address,
  28. type: connection.type,
  29. category: connection.category,
  30. activate_on_start: connection.act_on_start,
  31. connection_commands: connection.connection_commands
  32. })
  33.  
  34. listModel.append(mod)
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement