diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-31 11:57:00 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-09-10 14:21:48 +0200 |
commit | 2c631640121db780582db561bf3e939a201a03ad (patch) | |
tree | 287f7fef840776f77d67654626e2c2d9cf6cbd00 /src/corelib/kernel/qmetaobject.cpp | |
parent | 4b9ec075f8f6f1b38a91c43a66fae157415dfae1 (diff) |
Inline QMetaObject::cast(QObject *), as requested by ### Qt 6 comment
Task-number: QTBUG-85700
Change-Id: I29405df37b82d34a92537e39a3863b5f6c998556
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index be32921273..24769c28f5 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com> ** Contact: https://www.qt.io/licensing/ ** @@ -358,16 +358,12 @@ bool QMetaObject::inherits(const QMetaObject *metaObject) const noexcept } /*! + \fn QObject *QMetaObject::cast(QObject *obj) const \internal Returns \a obj if object \a obj inherits from this meta-object; otherwise returns \nullptr. */ -QObject *QMetaObject::cast(QObject *obj) const -{ - // ### Qt 6: inline - return const_cast<QObject*>(cast(const_cast<const QObject*>(obj))); -} /*! \internal |