47375a213f
The original code duplicated contained elements of a QStringList by repeated appending it to itself, preventing the container from being marked const. Instead, keep a list of unique mime-types, and iterate over the list eight times. As a drive-by, port from QList to a C array ("never use a dynamically-sized container for statically-sized data"), use u""_s UDLs (since we're touching almost all lines of the function, anyway, also in the unrelated mimeTypeForName() call). This allows porting the Q_FOREACH loop (which anyway cannot deal with C arrays) to a ranged for one (which can). Pick-to: 6.6 6.5 Task-number: QTBUG-115839 Change-Id: I844ae38104bb2980ea194b85f9017a3e95791ea2 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> |
||
---|---|---|
.. | ||
io | ||
itemmodels | ||
json | ||
kernel | ||
mimetypes | ||
plugin | ||
text | ||
thread | ||
time | ||
tools | ||
CMakeLists.txt |