summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/modemconfigwidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index b2f5c68..eb4bd0d 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,10 +1,9 @@
1#include "modemconfigwidget.h" 1#include "modemconfigwidget.h"
2#include "dialdialog.h" 2#include "dialdialog.h"
3#include "comboboxhelper.h"
3 4
4/* OPIE */ 5/* OPIE */
5#include <opie2/odebug.h>
6#include <qpe/qpeapplication.h> 6#include <qpe/qpeapplication.h>
7using namespace Opie::Core;
8 7
9/* QT */ 8/* QT */
10#include <qlabel.h> 9#include <qlabel.h>
@@ -13,19 +12,6 @@ using namespace Opie::Core;
13#include <qpushbutton.h> 12#include <qpushbutton.h>
14#include <qhbox.h> 13#include <qhbox.h>
15 14
16namespace {
17 void setCurrent( const QString& str, QComboBox* bo ) {
18 uint b = bo->count();
19 for (int i = 0; i < bo->count(); i++ ) {
20 if ( bo->text(i) == str ) {
21 bo->setCurrentItem( i );
22 return;
23 }
24 }
25 bo->insertItem( str );
26 bo->setCurrentItem( b );
27 }
28}
29 15
30ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, 16ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent,
31 const char* na ) 17 const char* na )
@@ -146,10 +132,9 @@ void ModemConfigWidget::load( const Profile& prof ) {
146 132
147 atConf->readConfig( prof ); 133 atConf->readConfig( prof );
148 if ( prof.readEntry( "Device" ).isEmpty() ) { 134 if ( prof.readEntry( "Device" ).isEmpty() ) {
149 owarn << "device empty!" << oendl;
150 return; 135 return;
151 } 136 }
152 setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); 137 ComboboxHelper::setCurrent( prof.readEntry( "Device" ), m_deviceCmb );
153 138
154 139
155} 140}