forked from qt-creator/qt-creator
Utils: Add a more user-friendly accessor to BaseAspects by Id
Change-Id: Ic99bd380008afaa88a346d0d5118a1af0a00f5ff Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
@@ -125,6 +125,11 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename T> T *aspect(Utils::Id id) const
|
||||
{
|
||||
return qobject_cast<T*>(aspect(id));
|
||||
}
|
||||
|
||||
void fromMap(const QVariantMap &map) const;
|
||||
void toMap(QVariantMap &map) const;
|
||||
|
||||
|
Reference in New Issue
Block a user