diff options
Diffstat (limited to 'src/gui/models/namesmodel.cpp')
-rw-r--r-- | src/gui/models/namesmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/models/namesmodel.cpp b/src/gui/models/namesmodel.cpp index ee26dbdaa..5344a7a7d 100644 --- a/src/gui/models/namesmodel.cpp +++ b/src/gui/models/namesmodel.cpp @@ -21,6 +21,7 @@ #include "gui/models/namesmodel.h" #include "utils/cast.h" +#include "utils/foreach.h" #include "utils/gettext.h" #include "debug.h" @@ -55,3 +56,13 @@ void NamesModel::fillFromArray(const char *const *const arr, for (size_t f = 0; f < sz; f ++) mNames.push_back(gettext(arr[f])); } + +void NamesModel::fillFromVector(const StringVect &vect) +{ + FOR_EACH(StringVectCIter, it, vect) + { + const std::string str = *it; + if (!str.empty()) + mNames.push_back(str); + } +} |