Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
TL;DR toSet/toList are very convenient utils and they don't hinder new C++ standards integration.
I'm already sick of refactoring code like this (example of real code)
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) auto tmp = ms.sources + uris(); auto tmp2 = QSet<QString>(tmp.begin(), tmp.end()); _uris = QStringList(tmp2.begin(), tmp2.end()); #else _uris = (ms.sources + uris()).toSet().toList(); #endif
toSet and toList were very neat. But now this code is hardly readable.
C++ standard lacks many cool things Qt has. Why do you at all want to make Qt that bad as plain C++?
Attachments
Issue Links
- replaces
-
QTBUG-71067 Add QSet::toVector()
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-83697 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
613391,1 | Sequence containers: add range constructors | dev | qt/qtbase | Status: NEW | 0 | 0 |
388782,4 | QList, QSet: add {from,to}Container convenience functions | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |