forked from qt-creator/qt-creator
Make Utils::transform more generic
- Works for all container types now, defaulting to the same container type for input and output - Enables specifying the result container type, e.g. QSet<X> x = Utils::transform<QSet>(list, function); - Use our own inserter instead of std::back_inserter, to enable usage with QSet<> Change-Id: I7256e51430bfc1409456c68b6ee270778b95e9d5 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -110,8 +110,8 @@ void writeQtIncludeSection(const QStringList &qt4,
|
||||
else
|
||||
trans = [](const QString &i) { return i.mid(i.indexOf(QLatin1Char('/')) + 1); };
|
||||
|
||||
QSet<QString> qt4Only = QSet<QString>::fromList(Utils::transform(qt4, trans));
|
||||
QSet<QString> qt5Only = QSet<QString>::fromList(Utils::transform(qt5, trans));
|
||||
QSet<QString> qt4Only = Utils::transform<QSet>(qt4, trans);
|
||||
QSet<QString> qt5Only = Utils::transform<QSet>(qt5, trans);
|
||||
|
||||
if (addQtVersionCheck) {
|
||||
QSet<QString> common = qt4Only;
|
||||
|
||||
Reference in New Issue
Block a user