Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/btconfigwidget.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp index 232e497..f2ed558 100644 --- a/noncore/apps/opie-console/btconfigwidget.cpp +++ b/noncore/apps/opie-console/btconfigwidget.cpp @@ -1,3 +1,7 @@ +#include "btconfigwidget.h" +#include "iolayerbase.h" +#include "comboboxhelper.h" + #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> @@ -5,22 +9,8 @@ #include <qhbox.h> #include <qradiobutton.h> -#include "iolayerbase.h" -#include "btconfigwidget.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 ); - } -} + BTConfigWidget::BTConfigWidget( const QString& name, QWidget* parent, @@ -115,7 +105,7 @@ void BTConfigWidget::load( const Profile& prof ) { } if ( prof.readEntry("Device").isEmpty() ) return; - setCurrent( prof.readEntry("Device"), m_deviceCmb ); + ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb ); } /* |