diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index b1f4a8229a..9b24fbdc93 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -226,8 +226,9 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) QSet oldProps = this->properties().toSet(); #else - QSet oldProps = QSet( - this->properties().begin(), this->properties().end()); + QCMakePropertyList const& oldPropsList = this->properties(); + QSet oldProps = + QSet(oldPropsList.begin(), oldPropsList.end()); #endif oldProps.intersect(newProps); newProps.subtract(oldProps);