Changeset View
Changeset View
Standalone View
Standalone View
addons/xmltools/plugin_katexmltools.cpp
Context not available. | |||||
1033 | // Sort list case-insensitive. This looks complicated but using a QMap | 1033 | // Sort list case-insensitive. This looks complicated but using a QMap | ||
---|---|---|---|---|---|
1034 | // is even suggested by the Qt documentation. | 1034 | // is even suggested by the Qt documentation. | ||
1035 | QMap<QString, QString> mapList; | 1035 | QMap<QString, QString> mapList; | ||
1036 | for (QStringList::Iterator it = list.begin(); it != list.end(); ++it) { | 1036 | for (const auto& str : qAsConst(list)) { | ||
1037 | QString str = *it; | | |||
1038 | if (mapList.contains(str.toLower())) { | 1037 | if (mapList.contains(str.toLower())) { | ||
1039 | // do not override a previous value, e.g. "Auml" and "auml" are two different | 1038 | // do not override a previous value, e.g. "Auml" and "auml" are two different | ||
1040 | // entities, but they should be sorted next to each other. | 1039 | // entities, but they should be sorted next to each other. | ||
Context not available. |