summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/btconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp22
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,29 +1,19 @@
+#include "btconfigwidget.h"
+#include "iolayerbase.h"
+#include "comboboxhelper.h"
+
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qcombobox.h>
#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,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
@@ -112,13 +102,13 @@ void BTConfigWidget::load( const Profile& prof ) {
default:
m_base->setSpeed(IOLayerBase::Baud_9600 );
break;
}
if ( prof.readEntry("Device").isEmpty() ) return;
- setCurrent( prof.readEntry("Device"), m_deviceCmb );
+ ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb );
}
/*
* save speed,
* flow,
* parity