summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/modemconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index d3a23fa..c37fafd 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,39 +1,39 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qhbox.h>
#include <qregexp.h>
#include "modemconfigwidget.h"
#include "dialdialog.h"
namespace {
void setCurrent( const QString& str, QComboBox* bo ) {
uint b = bo->count();
- for (uint i = 0; i < bo->count(); i++ ) {
+ for (int i = 0; i < bo->count(); i++ ) {
if ( bo->text(i) == str ) {
bo->setCurrentItem( i );
return;
}
}
bo->insertItem( str );
bo->setCurrentItem( b );
}
}
ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
m_lay = new QVBoxLayout( this );
m_device = new QLabel(tr( "Modem is attached to:" ), this );
m_deviceCmb = new QComboBox(this );
m_deviceCmb->setEditable( TRUE );
QLabel* telLabel = new QLabel( this );
telLabel->setText( tr( "Enter telefon number here:" ) );
m_telNumber = new QLineEdit( this );
QHBox *buttonBox = new QHBox( this );
QPushButton *atButton = new QPushButton( buttonBox );
@@ -105,48 +105,49 @@ void ModemConfigWidget::load( const Profile& prof ) {
case 19200:
m_base->setSpeed( IOLayerBase::Baud_19200 );
break;
case 9600:
default:
m_base->setSpeed( IOLayerBase::Baud_9600 );
break;
}
if ( prof.readEntry( "Device" ).isEmpty() ) {
return;
}
setCurrent( prof.readEntry( "Device" ), m_deviceCmb );
atConf->readConfig( prof );
}
/*
* save speed,
* flow,
* parity
*/
void ModemConfigWidget::save( Profile& prof ) {
int flow, parity, speed;
+ flow = parity = speed = 0;
prof.writeEntry( "Device", m_deviceCmb->currentText() );
switch( m_base->flow() ) {
case IOLayerBase::None:
flow = 0;
break;
case IOLayerBase::Software:
flow = 2;
break;
case IOLayerBase::Hardware:
flow = 1;
break;
}
switch( m_base->parity() ) {
case IOLayerBase::Odd:
parity = 2;
break;
case IOLayerBase::Even:
parity = 1;
break;
case IOLayerBase::NonePar:
parity = 0;