forked from qt-creator/qt-creator
Utils: Add toSet/toList functions
As replacement for functionality that's being deprecated in Qt but still useful or needed, or that cannot easily be handled without resorting to #if QT_VERSION checks in user code. Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -121,23 +121,23 @@ void writeQtIncludeSection(const QStringList &qt4,
|
||||
qt4Only.subtract(common);
|
||||
qt5Only.subtract(common);
|
||||
|
||||
qtSection(common.toList(), str);
|
||||
qtSection(Utils::toList(common), str);
|
||||
|
||||
if (!qt4Only.isEmpty() || !qt5Only.isEmpty()) {
|
||||
if (addQtVersionCheck)
|
||||
writeBeginQtVersionCheck(str);
|
||||
qtSection(qt5Only.toList(), str);
|
||||
qtSection(Utils::toList(qt5Only), str);
|
||||
if (addQtVersionCheck)
|
||||
str << QLatin1String("#else\n");
|
||||
qtSection(qt4Only.toList(), str);
|
||||
qtSection(Utils::toList(qt4Only), str);
|
||||
if (addQtVersionCheck)
|
||||
str << QLatin1String("#endif\n");
|
||||
}
|
||||
} else {
|
||||
if (!qt5Only.isEmpty()) // default to Qt5
|
||||
qtSection(qt5Only.toList(), str);
|
||||
qtSection(Utils::toList(qt5Only), str);
|
||||
else
|
||||
qtSection(qt4Only.toList(), str);
|
||||
qtSection(Utils::toList(qt4Only), str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user