Commit b261bf91 authored by Johnny Jazeix's avatar Johnny Jazeix

avoid intermediate list and cleaner way to convert to QSet

parent af7c68f7
......@@ -105,11 +105,10 @@ bool CacheReader::parse( const QString& file )
QSet<QString> CacheReader::documents() const
{
QList<QString> keys = mRanges.uniqueKeys();
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
return QSet<QString>::fromList( keys );
return QSet<QString>::fromList( mRanges.uniqueKeys() );
#else
return QSet<QString>( keys.begin(), keys.end() );
return QSet<QString>( mRanges.keyBegin(), mRanges.keyEnd() );
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment