327 MqttConnectionOptionsDialog |
327 MqttConnectionOptionsDialog |
328 dlg = MqttConnectionOptionsDialog( |
328 dlg = MqttConnectionOptionsDialog( |
329 self.__client, self.__connectionOptions, parent=self) |
329 self.__client, self.__connectionOptions, parent=self) |
330 if dlg.exec_() == QDialog.Accepted: |
330 if dlg.exec_() == QDialog.Accepted: |
331 self.__connectionOptions = dlg.getConnectionOptions() |
331 self.__connectionOptions = dlg.getConnectionOptions() |
|
332 if self.__connectionOptions["TlsEnable"]: |
|
333 port = self.brokerPortComboBox.currentText().strip() |
|
334 if port == "1883": |
|
335 # it is default non-encrypted port => set to TLS port |
|
336 self.brokerPortComboBox.setEditText("8883") |
|
337 else: |
|
338 port = self.brokerPortComboBox.currentText().strip() |
|
339 if port == "8883": |
|
340 # it is default TLS port => set to non-encrypted port |
|
341 self.brokerPortComboBox.setEditText("1883") |
332 |
342 |
333 @pyqtSlot() |
343 @pyqtSlot() |
334 def on_connectButton_clicked(self): |
344 def on_connectButton_clicked(self): |
335 """ |
345 """ |
336 Private slot to handle a connect or disconnect request. |
346 Private slot to handle a connect or disconnect request. |