forked from qt-creator/qt-creator
Utils: Add conversion operator to QStringList to BasicSmallStringVector
Change-Id: I32b7df9ff2e08e6e998a6d9efbf721bd7eeca28b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -135,6 +135,16 @@ public:
|
||||
return std::vector<std::string>(Base::begin(), Base::end());
|
||||
}
|
||||
|
||||
operator QStringList() const
|
||||
{
|
||||
QStringList qStringList;
|
||||
qStringList.reserve(int(Base::size()));
|
||||
|
||||
std::copy(Base::begin(), Base::end(), std::back_inserter(qStringList));
|
||||
|
||||
return qStringList;
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t totalByteSize() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user