parameters: (self)
docstring: delete connection
docstring_summary: delete connection
docstring_tokens: delete connection
function: def delete_connection(self):
          """delete connection"""
  
          current_text = self.cmbConnectionsServices.currentText()
  
          key = '/MetaSearch/%s' % current_text
  
          msg = self.tr('Remove service {0}?').format(current_text)
  
          result = QMessageBox.question(
              self, self.tr('Delete Service'), msg,
              QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
          if result == QMessageBox.Yes:  # remove service from list
              self.settings.remove(key)
              index_to_delete = self.cmbConnectionsServices.currentIndex()
              self.cmbConnectionsServices.removeItem(index_to_delete)
              self.cmbConnectionsSearch.removeItem(index_to_delete)
              self.set_connection_list_position()
function_tokens: def delete_connection ( self ) : current_text = self . cmbConnectionsServices . currentText ( ) key = '/MetaSearch/%s' % current_text msg = self . tr ( 'Remove service {0}?' ) . format ( current_text ) result = QMessageBox . question ( self , self . tr ( 'Delete Service' ) , msg , QMessageBox . Yes | QMessageBox . No , QMessageBox . No ) if result == QMessageBox . Yes : # remove service from list self . settings . remove ( key ) index_to_delete = self . cmbConnectionsServices . currentIndex ( ) self . cmbConnectionsServices . removeItem ( index_to_delete ) self . cmbConnectionsSearch . removeItem ( index_to_delete ) self . set_connection_list_position ( )