Diffstat (limited to 'noncore/apps/opie-console/irdaconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/irdaconfigwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/irdaconfigwidget.cpp b/noncore/apps/opie-console/irdaconfigwidget.cpp index 72e99a1..059530d 100644 --- a/noncore/apps/opie-console/irdaconfigwidget.cpp +++ b/noncore/apps/opie-console/irdaconfigwidget.cpp | |||
@@ -5,13 +5,13 @@ | |||
5 | #include "iolayerbase.h" | 5 | #include "iolayerbase.h" |
6 | #include "irdaconfigwidget.h" | 6 | #include "irdaconfigwidget.h" |
7 | 7 | ||
8 | namespace { | 8 | namespace { |
9 | void setCurrent( const QString& str, QComboBox* bo ) { | 9 | void setCurrent( const QString& str, QComboBox* bo ) { |
10 | uint b = bo->count(); | 10 | uint b = bo->count(); |
11 | for (uint i = 0; i < bo->count(); i++ ) { | 11 | for (int i = 0; i < bo->count(); i++ ) { |
12 | if ( bo->text(i) == str ) { | 12 | if ( bo->text(i) == str ) { |
13 | bo->setCurrentItem( i ); | 13 | bo->setCurrentItem( i ); |
14 | return; | 14 | return; |
15 | } | 15 | } |
16 | } | 16 | } |
17 | bo->insertItem( str ); | 17 | bo->insertItem( str ); |
@@ -92,12 +92,13 @@ void IrdaConfigWidget::load( const Profile& prof ) { | |||
92 | * save speed, | 92 | * save speed, |
93 | * flow, | 93 | * flow, |
94 | * parity | 94 | * parity |
95 | */ | 95 | */ |
96 | void IrdaConfigWidget::save( Profile& prof ) { | 96 | void IrdaConfigWidget::save( Profile& prof ) { |
97 | int flow, parity, speed; | 97 | int flow, parity, speed; |
98 | flow = parity = speed = 0; | ||
98 | prof.writeEntry("Device", m_deviceCmb->currentText() ); | 99 | prof.writeEntry("Device", m_deviceCmb->currentText() ); |
99 | 100 | ||
100 | switch( m_base->flow() ) { | 101 | switch( m_base->flow() ) { |
101 | case IOLayerBase::None: | 102 | case IOLayerBase::None: |
102 | flow = 0; | 103 | flow = 0; |
103 | break; | 104 | break; |
@@ -132,12 +133,13 @@ void IrdaConfigWidget::save( Profile& prof ) { | |||
132 | case IOLayerBase::Baud_38400: | 133 | case IOLayerBase::Baud_38400: |
133 | speed = 38400; | 134 | speed = 38400; |
134 | break; | 135 | break; |
135 | case IOLayerBase::Baud_19200: | 136 | case IOLayerBase::Baud_19200: |
136 | speed = 19200; | 137 | speed = 19200; |
137 | break; | 138 | break; |
139 | default: | ||
138 | case IOLayerBase::Baud_9600: | 140 | case IOLayerBase::Baud_9600: |
139 | speed = 9600; | 141 | speed = 9600; |
140 | break; | 142 | break; |
141 | } | 143 | } |
142 | 144 | ||
143 | prof.writeEntry("Flow", flow); | 145 | prof.writeEntry("Flow", flow); |