summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/modemconfigwidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index 3466e3a..9fdaf73 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,24 +1,27 @@
1#include "modemconfigwidget.h"
2#include "dialdialog.h"
1 3
4/* OPIE */
5#include <opie2/odebug.h>
2#include <qpe/qpeapplication.h> 6#include <qpe/qpeapplication.h>
7using namespace Opie::Core;
3 8
9/* QT */
4#include <qlabel.h> 10#include <qlabel.h>
5#include <qlayout.h> 11#include <qlayout.h>
6#include <qcombobox.h> 12#include <qcombobox.h>
7#include <qpushbutton.h> 13#include <qpushbutton.h>
8#include <qhbox.h> 14#include <qhbox.h>
9 15
10#include "modemconfigwidget.h"
11#include "dialdialog.h"
12
13namespace { 16namespace {
14 void setCurrent( const QString& str, QComboBox* bo ) { 17 void setCurrent( const QString& str, QComboBox* bo ) {
15 uint b = bo->count(); 18 uint b = bo->count();
16 for (int i = 0; i < bo->count(); i++ ) { 19 for (int i = 0; i < bo->count(); i++ ) {
17 if ( bo->text(i) == str ) { 20 if ( bo->text(i) == str ) {
18 bo->setCurrentItem( i ); 21 bo->setCurrentItem( i );
19 return; 22 return;
20 } 23 }
21 } 24 }
22 bo->insertItem( str ); 25 bo->insertItem( str );
23 bo->setCurrentItem( b ); 26 bo->setCurrentItem( b );
24 } 27 }
@@ -126,25 +129,25 @@ void ModemConfigWidget::load( const Profile& prof ) {
126 129
127 if ( sbits == 2) { 130 if ( sbits == 2) {
128 m_base->setStop( IOLayerBase::Stop_Two ); 131 m_base->setStop( IOLayerBase::Stop_Two );
129 } else if ( sbits == 15 ) { 132 } else if ( sbits == 15 ) {
130 m_base->setStop( IOLayerBase::Stop_OnePointFive ); 133 m_base->setStop( IOLayerBase::Stop_OnePointFive );
131 } else { 134 } else {
132 m_base->setStop( IOLayerBase::Stop_One ); 135 m_base->setStop( IOLayerBase::Stop_One );
133 } 136 }
134 137
135 138
136 atConf->readConfig( prof ); 139 atConf->readConfig( prof );
137 if ( prof.readEntry( "Device" ).isEmpty() ) { 140 if ( prof.readEntry( "Device" ).isEmpty() ) {
138 qWarning("device empty!"); 141 owarn << "device empty!" << oendl;
139 return; 142 return;
140 } 143 }
141 setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); 144 setCurrent( prof.readEntry( "Device" ), m_deviceCmb );
142 145
143 146
144} 147}
145 148
146/* 149/*
147 * save speed, 150 * save speed,
148 * flow, 151 * flow,
149 * parity 152 * parity
150 */ 153 */