Overview

Request 887596 superseded

- When using QT_DEBUG_TIMER, check if parent is set before following pointer.

Loading...

Fabian Vogt's avatar

Can be simplified to a two-line diff:

QString objPath = o->objectName();
if(objPath.isEmpty() && o->parent()) objPath = QLatin1String("<") + o->parent()->metaObject()->className() + QLatin1String(">");
else if(objPath.isEmpty() && !!o->parent()) objPath = QLatin1String("<No parent, no name>");
for (; o->parent(); o = o->parent())
...

Though I'm wondering why you still bother with libqt4...


Paul Fee's avatar

That two-line diff would missing the part: else objPath.prepend(QLatin1String("<No parent>"));

However, that's acceptable as one could tell that "objPath = o->objectName();" occurred and the for loop had zero iterations. I'll apply your suggestion.

As for libqt4, I'm debugging an application on Leap 15.2 that uses this version of Qt.

Request History
Paul Fee's avatar

paulfee created request

- When using QT_DEBUG_TIMER, check if parent is set before following pointer.


openSUSE Build Service is sponsored by