19 from EricWidgets import EricMessageBox |
19 from EricWidgets import EricMessageBox |
20 from EricWidgets.EricPathPicker import EricPathPickerModes |
20 from EricWidgets.EricPathPicker import EricPathPickerModes |
21 |
21 |
22 from .Ui_MqttConnectionProfilesDialog import Ui_MqttConnectionProfilesDialog |
22 from .Ui_MqttConnectionProfilesDialog import Ui_MqttConnectionProfilesDialog |
23 |
23 |
24 from .MqttClient import MqttClient, MqttProtocols |
24 from .MqttClient import MqttClient |
|
25 from .MqttProtocols import MqttProtocols |
25 |
26 |
26 import UI.PixmapCache |
27 import UI.PixmapCache |
27 from Utilities.crypto import pwConvert |
28 from Utilities.crypto import pwConvert |
28 |
29 |
29 |
30 |
273 elif self.mqttv311Button.isChecked(): |
274 elif self.mqttv311Button.isChecked(): |
274 protocol = MqttProtocols.MQTTv311 |
275 protocol = MqttProtocols.MQTTv311 |
275 elif self.mqttv5Button.isChecked(): |
276 elif self.mqttv5Button.isChecked(): |
276 protocol = MqttProtocols.MQTTv5 |
277 protocol = MqttProtocols.MQTTv5 |
277 else: |
278 else: |
|
279 # should never happen |
278 protocol = MqttProtocols.MQTTv311 |
280 protocol = MqttProtocols.MQTTv311 |
279 |
281 |
280 if protocol == MqttProtocols.MQTTv5: |
282 if protocol == MqttProtocols.MQTTv5: |
281 if self.connectPropertiesButton.isChecked(): |
283 if self.connectPropertiesButton.isChecked(): |
282 self.__userProperties["connect"] = ( |
284 self.__userProperties["connect"] = ( |
538 elif self.mqttv311Button.isChecked(): |
540 elif self.mqttv311Button.isChecked(): |
539 protocol = MqttProtocols.MQTTv311 |
541 protocol = MqttProtocols.MQTTv311 |
540 elif self.mqttv5Button.isChecked(): |
542 elif self.mqttv5Button.isChecked(): |
541 protocol = MqttProtocols.MQTTv5 |
543 protocol = MqttProtocols.MQTTv5 |
542 else: |
544 else: |
|
545 # should never happen |
543 protocol = MqttProtocols.MQTTv311 |
546 protocol = MqttProtocols.MQTTv311 |
544 |
547 |
545 connectionProfile = self.__defaultProfile() |
548 connectionProfile = self.__defaultProfile() |
546 connectionProfile.update(self.__profiles[profileName]) |
549 connectionProfile.update(self.__profiles[profileName]) |
547 changed = ( |
550 changed = ( |