diff options
author | Roland Knall <roland.knall@br-automation.com> | 2016-01-28 10:41:38 +0100 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-01-28 14:51:14 +0000 |
commit | 97a1a50e200a6c50e0014dde7e8ec932c30190a1 (patch) | |
tree | f7f49f88fd79da22f17d95d39f94b146c2e3b316 /ui/qt/extcap_argument_multiselect.cpp | |
parent | 08527e9b85d91f1d121bfa323b9c32780012a02c (diff) |
extcap: Cleanup complex types and add save option
Cleanup handling of complex data types and use only
glib defined datatypes while handling argument values.
Add a save parameter, which (additionally) can set, that
a parameter is not saved in a configuration file. Passwords
are by default not saved, which may be overwritten using
this parameter
Change-Id: I67eff0f3286170f082d532e806a39511c40df647
Reviewed-on: https://code.wireshark.org/review/13573
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/extcap_argument_multiselect.cpp')
-rw-r--r-- | ui/qt/extcap_argument_multiselect.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/ui/qt/extcap_argument_multiselect.cpp b/ui/qt/extcap_argument_multiselect.cpp index fc01dfb351..221f0f240b 100644 --- a/ui/qt/extcap_argument_multiselect.cpp +++ b/ui/qt/extcap_argument_multiselect.cpp @@ -119,8 +119,8 @@ QWidget * ExtArgMultiSelect::createEditor(QWidget * parent) if (items.length() == 0) return new QWidget(); - if ( _default != 0 ) - defaults = _default->toString().split(",", QString::SkipEmptyParts); + if ( defaultValue().length() > 0 ) + defaults = defaultValue().split(",", QString::SkipEmptyParts); viewModel = new QStandardItemModel(); QList<QStandardItem *>::const_iterator iter = items.constBegin(); @@ -173,18 +173,6 @@ QString ExtArgMultiSelect::value() return result.join(QString(",")); } -QString ExtArgMultiSelect::defaultValue() -{ - if ( _argument != 0 && _argument->default_complex != 0) - { - gchar * str = extcap_get_complex_as_string(_argument->default_complex); - if ( str != 0 ) - return QString(str); - } - - return QString(); -} - void ExtArgMultiSelect::selectionChanged(const QItemSelection &, const QItemSelection &) { emit valueChanged(); |