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) (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 @@
+#include "btconfigwidget.h"
+#include "iolayerbase.h"
+#include "comboboxhelper.h"
+
#include <qlabel.h>
#include <qlayout.h>
@@ -6,20 +10,6 @@
#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,
@@ -116,5 +106,5 @@ 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 );
}