Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index dc42d8b..8109070 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp @@ -1,2 +1,7 @@ +#include "profileeditordialog.h" +#include "metafactory.h" +#include "comboboxhelper.h" + + #include <qlayout.h> #include <qlineedit.h> @@ -7,17 +12,8 @@ #include <qscrollview.h> -#include "metafactory.h" -#include "profileeditordialog.h" + using namespace Opie::Ui; -namespace { - void setCurrent( const QString& str, QComboBox* bo ) { - for (int i = 0; i < bo->count(); i++ ) { - if ( bo->text(i) == str ) { - bo->setCurrentItem( i ); - } - } - }; -} + ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, @@ -125,6 +121,6 @@ void ProfileEditorDialog::initUI() m_name->setText(m_prof.name()); slotKeyActivated( "Default Keyboard" ); - setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); - setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); + ComboboxHelper::setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); + ComboboxHelper::setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); slotTermActivated( m_fact->external(m_prof.terminalName() ) ); |