diff --git a/src/blackmisc/context.h b/src/blackmisc/context.h index 9134a1eda..55c833b69 100644 --- a/src/blackmisc/context.h +++ b/src/blackmisc/context.h @@ -93,8 +93,8 @@ namespace BlackMisc */ template bool hasObject(const QString &name = T::staticMetaObject.className()) const { - QObject *qobj = getQObjectNothrow(name); - return qobj && qobject_cast(qobj); + const QObject *qobj = getQObjectNothrow(name); + return qobj && qobject_cast(qobj); } /*!