qml: rm QEConfig.serverString. Network.server is sufficient
If there is no network object, it's ok not to be able to customise it.
This commit is contained in:
@@ -42,7 +42,6 @@ ElDialog {
|
|||||||
icon.source: '../../icons/confirmed.png'
|
icon.source: '../../icons/confirmed.png'
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Config.autoConnect = serverconfig.auto_connect
|
Config.autoConnect = serverconfig.auto_connect
|
||||||
Config.serverString = serverconfig.address
|
|
||||||
Network.server = serverconfig.address
|
Network.server = serverconfig.address
|
||||||
rootItem.close()
|
rootItem.close()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ Wizard {
|
|||||||
Config.autoConnect = wizard_data['autoconnect']
|
Config.autoConnect = wizard_data['autoconnect']
|
||||||
if (!wizard_data['autoconnect']) {
|
if (!wizard_data['autoconnect']) {
|
||||||
Network.server = wizard_data['server']
|
Network.server = wizard_data['server']
|
||||||
Config.serverString = wizard_data['server']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Item {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
root.auto_connect = Config.autoConnectDefined ? Config.autoConnect : false
|
root.auto_connect = Config.autoConnectDefined ? Config.autoConnect : false
|
||||||
root.address = Config.serverString ? Config.serverString : Network.server
|
root.address = Network.server
|
||||||
// TODO: initial setup should not connect already, is Network.server defined?
|
// TODO: initial setup should not connect already, is Network.server defined?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,16 +57,6 @@ class QEConfig(AuthMixin, QObject):
|
|||||||
def autoConnectDefined(self):
|
def autoConnectDefined(self):
|
||||||
return self.config.get('auto_connect') is not None
|
return self.config.get('auto_connect') is not None
|
||||||
|
|
||||||
serverStringChanged = pyqtSignal()
|
|
||||||
@pyqtProperty('QString', notify=serverStringChanged)
|
|
||||||
def serverString(self):
|
|
||||||
return self.config.get('server')
|
|
||||||
|
|
||||||
@serverString.setter
|
|
||||||
def serverString(self, server):
|
|
||||||
self.config.set_key('server', server, True)
|
|
||||||
self.serverStringChanged.emit()
|
|
||||||
|
|
||||||
manualServerChanged = pyqtSignal()
|
manualServerChanged = pyqtSignal()
|
||||||
@pyqtProperty(bool, notify=manualServerChanged)
|
@pyqtProperty(bool, notify=manualServerChanged)
|
||||||
def manualServer(self):
|
def manualServer(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user