author | zecke <zecke> | 2002-10-21 22:15:31 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-21 22:15:31 (UTC) |
commit | 151729eb3e4e4cfbb69db1f027e74188cf55c328 (patch) (unidiff) | |
tree | 73705a6ca967933780062a95756dc18ae7bd8167 /noncore/apps/opie-console/btconfigwidget.cpp | |
parent | 5bcd4ccebd86f912c693de16675da44d21e11d94 (diff) | |
download | opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.zip opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.tar.gz opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.tar.bz2 |
Fix the addPage bug... and avoid some compiler warnings. REMEMBER WARNINGS ARE BUGS
Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/btconfigwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp index 6246f92..64046d8 100644 --- a/noncore/apps/opie-console/btconfigwidget.cpp +++ b/noncore/apps/opie-console/btconfigwidget.cpp | |||
@@ -6,17 +6,17 @@ | |||
6 | #include <qradiobutton.h> | 6 | #include <qradiobutton.h> |
7 | 7 | ||
8 | #include "iolayerbase.h" | 8 | #include "iolayerbase.h" |
9 | #include "btconfigwidget.h" | 9 | #include "btconfigwidget.h" |
10 | 10 | ||
11 | namespace { | 11 | namespace { |
12 | void setCurrent( const QString& str, QComboBox* bo ) { | 12 | void setCurrent( const QString& str, QComboBox* bo ) { |
13 | uint b = bo->count(); | 13 | uint b = bo->count(); |
14 | for (uint i = 0; i < bo->count(); i++ ) { | 14 | for (int i = 0; i < bo->count(); i++ ) { |
15 | if ( bo->text(i) == str ) { | 15 | if ( bo->text(i) == str ) { |
16 | bo->setCurrentItem( i ); | 16 | bo->setCurrentItem( i ); |
17 | return; | 17 | return; |
18 | } | 18 | } |
19 | } | 19 | } |
20 | bo->insertItem( str ); | 20 | bo->insertItem( str ); |
21 | bo->setCurrentItem( b ); | 21 | bo->setCurrentItem( b ); |
22 | } | 22 | } |
@@ -111,16 +111,17 @@ void BTConfigWidget::load( const Profile& prof ) { | |||
111 | } | 111 | } |
112 | /* | 112 | /* |
113 | * save speed, | 113 | * save speed, |
114 | * flow, | 114 | * flow, |
115 | * parity | 115 | * parity |
116 | */ | 116 | */ |
117 | void BTConfigWidget::save( Profile& prof ) { | 117 | void BTConfigWidget::save( Profile& prof ) { |
118 | int flow, parity, speed; | 118 | int flow, parity, speed; |
119 | flow = parity = speed = 0; | ||
119 | prof.writeEntry("Device", m_deviceCmb->currentText() ); | 120 | prof.writeEntry("Device", m_deviceCmb->currentText() ); |
120 | 121 | ||
121 | 122 | ||
122 | switch( m_base->flow() ) { | 123 | switch( m_base->flow() ) { |
123 | case IOLayerBase::None: | 124 | case IOLayerBase::None: |
124 | flow = 0; | 125 | flow = 0; |
125 | break; | 126 | break; |
126 | case IOLayerBase::Software: | 127 | case IOLayerBase::Software: |
@@ -151,16 +152,17 @@ void BTConfigWidget::save( Profile& prof ) { | |||
151 | speed = 57600; | 152 | speed = 57600; |
152 | break; | 153 | break; |
153 | case IOLayerBase::Baud_38400: | 154 | case IOLayerBase::Baud_38400: |
154 | speed = 38400; | 155 | speed = 38400; |
155 | break; | 156 | break; |
156 | case IOLayerBase::Baud_19200: | 157 | case IOLayerBase::Baud_19200: |
157 | speed = 19200; | 158 | speed = 19200; |
158 | break; | 159 | break; |
160 | default: | ||
159 | case IOLayerBase::Baud_9600: | 161 | case IOLayerBase::Baud_9600: |
160 | speed = 9600; | 162 | speed = 9600; |
161 | break; | 163 | break; |
162 | } | 164 | } |
163 | 165 | ||
164 | prof.writeEntry("Flow", flow); | 166 | prof.writeEntry("Flow", flow); |
165 | prof.writeEntry("Parity", parity); | 167 | prof.writeEntry("Parity", parity); |
166 | prof.writeEntry("Speed", speed); | 168 | prof.writeEntry("Speed", speed); |