-rw-r--r-- | noncore/apps/opie-console/irdaconfigwidget.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/irdaconfigwidget.cpp b/noncore/apps/opie-console/irdaconfigwidget.cpp index 1cc041b..2341fd4 100644 --- a/noncore/apps/opie-console/irdaconfigwidget.cpp +++ b/noncore/apps/opie-console/irdaconfigwidget.cpp @@ -32,49 +32,49 @@ IrdaConfigWidget::IrdaConfigWidget( const QString& name, m_deviceCmb->setEditable( TRUE ); m_base = new IOLayerBase(this, "base"); m_lay->addWidget( m_device ); m_lay->addWidget( m_deviceCmb ); m_lay->addWidget( m_base ); m_deviceCmb->insertItem( "/dev/ircomm0" ); m_deviceCmb->insertItem( "/dev/ircomm1" ); } IrdaConfigWidget::~IrdaConfigWidget() { } void IrdaConfigWidget::load( const Profile& prof ) { int rad_flow = prof.readNumEntry("Flow"); int rad_parity = prof.readNumEntry("Parity"); int speed = prof.readNumEntry("Speed"); if (rad_flow == 1) { m_base->setFlow( IOLayerBase::Hardware ); } else if (rad_flow == 2) { m_base->setFlow( IOLayerBase::Software ); - } else if (rad_flow == 0) { + } else { m_base->setFlow( IOLayerBase::None ); } if (rad_parity == 1) { m_base->setParity( IOLayerBase::Even ); } else { m_base->setParity( IOLayerBase::Odd ); } switch( speed ) { case 115200: m_base->setSpeed(IOLayerBase::Baud_115200 ); break; case 57600: m_base->setSpeed( IOLayerBase::Baud_57600 ); break; case 38400: m_base->setSpeed(IOLayerBase::Baud_38400 ); break; case 19200: m_base->setSpeed( IOLayerBase::Baud_19200 ); break; case 9600: default: diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index b1ec408..89acc98 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp @@ -34,56 +34,57 @@ SerialConfigWidget::SerialConfigWidget( const QString& name, m_base = new IOLayerBase(this, "base"); m_lay->addWidget( m_device ); m_lay->addWidget( m_deviceCmb ); m_lay->addWidget( m_base ); m_deviceCmb->insertItem( "/dev/ttyS0" ); m_deviceCmb->insertItem( "/dev/ttyS1" ); m_deviceCmb->insertItem( "/dev/ttySA0"); m_deviceCmb->insertItem( "/dev/ttySA1"); } SerialConfigWidget::~SerialConfigWidget() { } void SerialConfigWidget::load( const Profile& prof ) { int rad_flow = prof.readNumEntry("Flow"); int rad_parity = prof.readNumEntry("Parity"); int speed = prof.readNumEntry("Speed"); if (rad_flow == 1) { m_base->setFlow( IOLayerBase::Hardware ); } else if (rad_flow == 2) { m_base->setFlow( IOLayerBase::Software ); - } else if (rad_flow == 0) { + } else { m_base->setFlow( IOLayerBase::None ); } - if (rad_parity == 1) + if (rad_parity == 1) { m_base->setParity( IOLayerBase::Even ); - else + } else { m_base->setParity( IOLayerBase::Odd ); + } switch( speed ) { case 115200: m_base->setSpeed(IOLayerBase::Baud_115200 ); break; case 57600: m_base->setSpeed( IOLayerBase::Baud_57600 ); break; case 38400: m_base->setSpeed(IOLayerBase::Baud_38400 ); break; 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 ); } |