rjvbb added a comment.
> As far as I know, using qobject_cast is faster than comparing class names, because it only compares metaclass pointers. Additionally, it allows subclasses. Purely academic: that would be true for an ObjC-like construct like `isKindOfClass` but doesn't it qobject_cast also do additional work as part of the casting? Allowing subclasses could be good here, but it could also defeat the purpose, that'd depend on what the subclass changes w.r.t. KFileWidget. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D18380 To: rjvbb, ngraham, #frameworks, #dolphin, apol, dfaure, ahartmetz Cc: cfeck, dhaumann, kwrite-devel, kde-frameworks-devel, michaelh, ngraham, bruns