diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-29 10:45:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 10:44:05 +0200 |
commit | 7be4e64b4bac6e6b5a90eec74b9f2b661c60db3a (patch) | |
tree | 41d2f586576787ffa71e567398391f7ab504ae89 /sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | |
parent | e5595a4b3010b1bb4b6f80a0339271a7b26934de (diff) |
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 <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<CXCursor, ClassModelItem> CursorClassHash; - typedef QHash<CXCursor, TypeDefModelItem> CursorTypedefHash; - typedef QHash<CXType, TypeInfo> TypeInfoHash; + using CursorClassHash = QHash<CXCursor, ClassModelItem>; + using CursorTypedefHash = QHash<CXCursor, TypeDefModelItem>; + using TypeInfoHash = QHash<CXType, TypeInfo>; explicit BuilderPrivate(BaseVisitor *bv) : m_baseVisitor(bv), m_model(new CodeModel) { @@ -645,11 +645,9 @@ static inline CXCursor definitionFromTypeRef(const CXCursor &typeRefCursor) template <class Item> // ArgumentModelItem, VariableModelItem void BuilderPrivate::qualifyTypeDef(const CXCursor &typeRefCursor, const QSharedPointer<Item> &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); |