OSDN Git Service

Symbian: fixed the Debugging agents UI
authorPawel Polanski <pawel.3.polanski@nokia.com>
Tue, 15 Mar 2011 11:08:12 +0000 (12:08 +0100)
committerPawel Polanski <pawel.3.polanski@nokia.com>
Tue, 15 Mar 2011 11:08:12 +0000 (12:08 +0100)
src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp
src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h

index caa10fe..a229f06 100644 (file)
@@ -302,7 +302,7 @@ QWidget *S60DeployConfigurationWidget::createCommunicationChannel()
 
     communicationChannelGroupBox->setLayout(communicationChannelGridLayout);
 
-    updateCommunicationChannel();
+    updateCommunicationChannelUi();
 
     return communicationChannelGroupBox;
 }
@@ -413,6 +413,32 @@ void S60DeployConfigurationWidget::setSerialPort(int index)
     clearDeviceInfo();
 }
 
+void S60DeployConfigurationWidget::updateCommunicationChannelUi()
+{
+    S60DeployConfiguration::CommunicationChannel channel = m_deployConfiguration->communicationChannel();
+    if (channel == S60DeployConfiguration::CommunicationTrkSerialConnection) {
+        m_trkRadioButton->setChecked(true);
+        m_codaRadioButton->setChecked(false);
+        m_serialRadioButton->setChecked(true);
+        m_wlanRadioButton->setDisabled(true);
+        m_ipAddress->setDisabled(true);
+        m_serialPortsCombo->setDisabled(false);
+        updateSerialDevices();
+    } else {
+        m_trkRadioButton->setChecked(false);
+        m_codaRadioButton->setChecked(true);
+        m_wlanRadioButton->setDisabled(false);
+        if (channel == S60DeployConfiguration::CommunicationCodaTcpConnection) {
+            m_ipAddress->setDisabled(false);
+            m_serialPortsCombo->setDisabled(true);
+        } else {
+            m_ipAddress->setDisabled(true);
+            m_serialPortsCombo->setDisabled(false);
+            updateSerialDevices();
+        }
+    }
+}
+
 void S60DeployConfigurationWidget::updateCommunicationChannel()
 {
     if (!m_trkRadioButton->isChecked() && !m_codaRadioButton->isChecked())
@@ -434,7 +460,6 @@ void S60DeployConfigurationWidget::updateCommunicationChannel()
             m_ipAddress->setDisabled(false);
             m_serialPortsCombo->setDisabled(true);
             m_deployConfiguration->setCommunicationChannel(S60DeployConfiguration::CommunicationCodaTcpConnection);
-            m_deviceInfoButton->setEnabled(true);
         } else {
             m_ipAddress->setDisabled(true);
             m_serialPortsCombo->setDisabled(false);
index d80479d..7424eb4 100644 (file)
@@ -100,6 +100,7 @@ private slots:
     void slotWaitingForTrkClosed();
     void silentInstallChanged(int);
     void updateCommunicationChannel();
+    void updateCommunicationChannelUi();
     void updateWlanAddress(const QString &address);
     void cleanWlanAddress();
     void codaEvent(const Coda::CodaEvent &event);