From 86b19d64c2692665aba33e44ee5db6cbf36b6342 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 13 Sep 2017 21:54:39 +0300 Subject: Add option to select any existing SDL renderer drivers for SDL2 default mode. --- src/gui/models/namesmodel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/models/namesmodel.cpp') 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); + } +} -- cgit v1.2.3-70-g09d2