From 7be4e64b4bac6e6b5a90eec74b9f2b661c60db3a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 29 May 2019 10:45:37 +0200 Subject: shiboken: Replace 'typedef' by 'using' Apply Fixits by Qt Creator with some amendments. Remove iterator types by using auto instead. Change-Id: I8a75323da6ae5cdcc6b67af8be9376408953986b Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp') diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp index 3ced0e06c..8d1b4debf 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp @@ -144,9 +144,9 @@ static bool isSigned(CXTypeKind kind) class BuilderPrivate { public: - typedef QHash CursorClassHash; - typedef QHash CursorTypedefHash; - typedef QHash TypeInfoHash; + using CursorClassHash = QHash; + using CursorTypedefHash = QHash; + using TypeInfoHash = QHash; explicit BuilderPrivate(BaseVisitor *bv) : m_baseVisitor(bv), m_model(new CodeModel) { @@ -645,11 +645,9 @@ static inline CXCursor definitionFromTypeRef(const CXCursor &typeRefCursor) template // ArgumentModelItem, VariableModelItem void BuilderPrivate::qualifyTypeDef(const CXCursor &typeRefCursor, const QSharedPointer &item) const { - typedef typename CursorTypedefHash::const_iterator ConstIt; - TypeInfo type = item->type(); if (type.qualifiedName().size() == 1) { // item's type is unqualified. - const ConstIt it = m_cursorTypedefHash.constFind(definitionFromTypeRef(typeRefCursor)); + const auto it = m_cursorTypedefHash.constFind(definitionFromTypeRef(typeRefCursor)); if (it != m_cursorTypedefHash.constEnd() && !it.value()->scope().isEmpty()) { type.setQualifiedName(it.value()->scope() + type.qualifiedName()); item->setType(type); -- cgit v1.2.3