diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-10 20:14:46 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-10 20:42:56 (GMT) |
commit | d7679f642762c4ea5a8e0839bbf990eb179a648a (patch) | |
tree | 892b4c8bba3ad6a4128d075f6ebfd5c7d7a83dcd | |
parent | 973fc5602066ba6e57a282581f3137dd9bfdd7a8 (diff) | |
download | CMake-d7679f642762c4ea5a8e0839bbf990eb179a648a.zip CMake-d7679f642762c4ea5a8e0839bbf990eb179a648a.tar.gz CMake-d7679f642762c4ea5a8e0839bbf990eb179a648a.tar.bz2 |
QCMakeCacheView: use non-deprecated List and Set constructions
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 40cc89c..541d3e9 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -217,14 +217,27 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) QSet<QCMakeProperty> newProps2; if (this->ShowNewProperties) { +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) newProps = props.toSet(); +#else + newProps = QSet(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()); +#endif oldProps.intersect(newProps); newProps.subtract(oldProps); newProps2.subtract(newProps); } else { +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) newProps2 = props.toSet(); +#else + newProps2 = QSet(props.begin(), props.end()); +#endif } bool b = this->blockSignals(true); @@ -233,8 +246,8 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) this->NewPropertyCount = newProps.size(); if (View == FlatView) { - QCMakePropertyList newP = newProps.toList(); - QCMakePropertyList newP2 = newProps2.toList(); + QCMakePropertyList newP = newProps.values(); + QCMakePropertyList newP2 = newProps2.values(); #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) std::sort(newP.begin(), newP.end()); std::sort(newP2.begin(), newP2.end()); |