summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/btconfigwidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (show 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,2 +1,6 @@
1#include "btconfigwidget.h"
2#include "iolayerbase.h"
3#include "comboboxhelper.h"
4
1#include <qlabel.h> 5#include <qlabel.h>
2#include <qlayout.h> 6#include <qlayout.h>
@@ -6,20 +10,6 @@
6#include <qradiobutton.h> 10#include <qradiobutton.h>
7 11
8#include "iolayerbase.h"
9#include "btconfigwidget.h"
10 12
11namespace { 13
12 void setCurrent( const QString& str, QComboBox* bo ) {
13 uint b = bo->count();
14 for (int i = 0; i < bo->count(); i++ ) {
15 if ( bo->text(i) == str ) {
16 bo->setCurrentItem( i );
17 return;
18 }
19 }
20 bo->insertItem( str );
21 bo->setCurrentItem( b );
22 }
23}
24 14
25BTConfigWidget::BTConfigWidget( const QString& name, 15BTConfigWidget::BTConfigWidget( const QString& name,
@@ -116,5 +106,5 @@ void BTConfigWidget::load( const Profile& prof ) {
116 106
117 if ( prof.readEntry("Device").isEmpty() ) return; 107 if ( prof.readEntry("Device").isEmpty() ) return;
118 setCurrent( prof.readEntry("Device"), m_deviceCmb ); 108 ComboboxHelper::setCurrent( prof.readEntry("Device"), m_deviceCmb );
119 109
120} 110}