QNX: Fix compilation with Qt 4.

Introduced by b254313c68 .

Change-Id: Ib1b41da58eef97f5fe961ca12bcfcabeae4fd523
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Friedemann Kleint
2014-02-05 17:04:08 +01:00
committed by Tobias Nätterlund
parent 783d6ebbd2
commit fe13d33907

View File

@@ -620,9 +620,8 @@ int BarDescriptorDocument::tagForElement(const QDomElement &element)
QMetaEnum tags = metaObject()->enumerator(metaObject()->enumeratorOffset());
QDomElement el = element;
while (!el.isNull()) {
bool ok;
int n = tags.keyToValue(el.tagName().toLatin1().constData(), &ok);
if (ok)
const int n = tags.keyToValue(el.tagName().toLatin1().constData());
if (n > -1)
return n;
el = el.parentNode().toElement();
}