Moc generator: avoid creating QMap::keys().
Iterate the keys directly off the QMap itself. Change-Id: I7792414db250d8ae63a935513a16a01eb184ebde Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
760b2929a3
commit
5361a8dec5
@ -499,9 +499,9 @@ void Generator::generateCode()
|
|||||||
// QTBUG-20639 - Accept non-local enums for QML signal/slot parameters.
|
// QTBUG-20639 - Accept non-local enums for QML signal/slot parameters.
|
||||||
// Look for any scoped enum declarations, and add those to the list
|
// Look for any scoped enum declarations, and add those to the list
|
||||||
// of extra/related metaobjects for this object.
|
// of extra/related metaobjects for this object.
|
||||||
QList<QByteArray> enumKeys = cdef->enumDeclarations.keys();
|
for (auto it = cdef->enumDeclarations.keyBegin(),
|
||||||
for (int i = 0; i < enumKeys.count(); ++i) {
|
end = cdef->enumDeclarations.keyEnd(); it != end; ++it) {
|
||||||
const QByteArray &enumKey = enumKeys[i];
|
const QByteArray &enumKey = *it;
|
||||||
int s = enumKey.lastIndexOf("::");
|
int s = enumKey.lastIndexOf("::");
|
||||||
if (s > 0) {
|
if (s > 0) {
|
||||||
QByteArray scope = enumKey.left(s);
|
QByteArray scope = enumKey.left(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user