From 999a0f2d22f132005bde62558ace48a0ce8b1dcc Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 16 Oct 2004 21:06:28 +0000 Subject: -Remove never finished classes by ibotty for the console widget -Put setCurrent into ComboboxHelper and remove duplication from the dialogs -Remove old and unneeded debug output -IOBt, IOIrda can share the implementation for sening,recieving and supports with IOSerial --- (limited to 'noncore/apps/opie-console/serialconfigwidget.cpp') diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index c4c9c99..4efb286 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp @@ -1,25 +1,12 @@ -#include -#include -#include - #include "iolayerbase.h" #include "serialconfigwidget.h" +#include "comboboxhelper.h" -namespace { - void setCurrent( const QString& str, QComboBox* bo ) { - uint b = bo->count(); - for (int i = 0; i < bo->count(); i++ ) { - if ( bo->text(i) == str ) { - bo->setCurrentItem( i ); - return; - } - } - bo->insertItem( str ); - bo->setCurrentItem( b ); - } +#include +#include +#include -} SerialConfigWidget::SerialConfigWidget( const QString& name, QWidget* parent, @@ -116,7 +103,7 @@ void SerialConfigWidget::load( const Profile& prof ) { } if ( prof.readEntry("Device").isEmpty() ) return; - setCurrent( prof.readEntry("Device"), m_deviceCmb ); + ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb ); } /* -- cgit v0.9.0.2