MqttMonitor/MqttMonitorWidget.py

branch
connection_profiles
changeset 25
01d44a4decf5
parent 21
be4b201d9a41
child 28
0f02baed8308
--- a/MqttMonitor/MqttMonitorWidget.py	Fri Sep 07 18:10:31 2018 +0200
+++ b/MqttMonitor/MqttMonitorWidget.py	Sat Sep 08 15:28:48 2018 +0200
@@ -329,6 +329,16 @@
                 self.__client, self.__connectionOptions, parent=self)
             if dlg.exec_() == QDialog.Accepted:
                 self.__connectionOptions = dlg.getConnectionOptions()
+                if self.__connectionOptions["TlsEnable"]:
+                    port = self.brokerPortComboBox.currentText().strip()
+                    if port == "1883":
+                        # it is default non-encrypted port => set to TLS port
+                        self.brokerPortComboBox.setEditText("8883")
+                else:
+                    port = self.brokerPortComboBox.currentText().strip()
+                    if port == "8883":
+                        # it is default TLS port => set to non-encrypted port
+                        self.brokerPortComboBox.setEditText("1883")
     
     @pyqtSlot()
     def on_connectButton_clicked(self):

eric ide

mercurial