1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-20 12:53:55 +08:00

cmake-gui: Fix compilation as C++14 with Qt 5.14

Fix code added by commit d7679f6427 (QCMakeCacheView: use non-deprecated
List and Set constructions, 2020-06-10, v3.18.0-rc2~13^2), used
conditionally on Qt 5.14 or above, to compile as C++14.
This commit is contained in:
Brad King
2020-07-06 11:35:45 -04:00
parent 1e26c84b96
commit 8eb7cf9b5f

View File

@@ -220,14 +220,14 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
newProps = props.toSet();
#else
newProps = QSet(props.begin(), props.end());
newProps = QSet<QCMakeProperty>(props.begin(), props.end());
#endif
newProps2 = newProps;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QSet<QCMakeProperty> oldProps = this->properties().toSet();
#else
QSet<QCMakeProperty> oldProps =
QSet(this->properties().begin(), this->properties().end());
QSet<QCMakeProperty> oldProps = QSet<QCMakeProperty>(
this->properties().begin(), this->properties().end());
#endif
oldProps.intersect(newProps);
newProps.subtract(oldProps);
@@ -236,7 +236,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
newProps2 = props.toSet();
#else
newProps2 = QSet(props.begin(), props.end());
newProps2 = QSet<QCMakeProperty>(props.begin(), props.end());
#endif
}