Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
-
19aa5da9b (dev)
Description
The following code can produce a warning:
QList<Bar> entries; std::vector<Foo> values; values.reserve(entries.size()); // warning
You can silence the warning with:
QList<Bar> entries; std::vector<Foo> values; values.reserve(static_cast<std::size_t>(entries.size())); // no warning but very verbose
Adding usize() to Qt Container would improve the readability of the code:
QList<Bar> entries; std::vector<Foo> values; values.reserve(entries.usize()); // warning