uic: Replace 'typedef' by 'using'

Apply Fixits by Qt Creator with some amendments.

Change-Id: I152cb5935ff7d649de297b010b9253c625c7da84
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Friedemann Kleint 2019-06-06 10:57:04 +02:00
parent 2f84ec4bcd
commit 5343a7018e
4 changed files with 10 additions and 10 deletions

View File

@ -82,7 +82,7 @@ private:
void add(const QString &className, bool determineHeader = true, const QString &header = QString(), bool global = false);
private:
typedef std::set<QString> OrderedSet;
using OrderedSet = std::set<QString>;
void insertIncludeForClass(const QString &className, QString header = QString(), bool global = false);
void insertInclude(const QString &header, bool global);
void writeHeaders(const OrderedSet &headers, bool global);
@ -97,7 +97,7 @@ private:
QSet<QString> m_knownClasses;
typedef QMap<QString, QString> StringMap;
using StringMap = QMap<QString, QString>;
StringMap m_classToHeader;
StringMap m_oldHeaderToNewHeader;

View File

@ -85,8 +85,8 @@ namespace CPP {
struct WriteInitialization : public TreeWalker
{
typedef QList<DomProperty*> DomPropertyList;
typedef QHash<QString, DomProperty*> DomPropertyMap;
using DomPropertyList = QList<DomProperty*>;
using DomPropertyMap = QHash<QString, DomProperty*>;
WriteInitialization(Uic *uic);
@ -259,13 +259,13 @@ private:
QVector<Buddy> m_buddies;
QSet<QString> m_buttonGroups;
typedef QHash<uint, QString> ColorBrushHash;
using ColorBrushHash = QHash<uint, QString>;
ColorBrushHash m_colorBrushHash;
// Map from font properties to font variable name for reuse
// Map from size policy to variable for reuse
typedef QMap<FontHandle, QString> FontPropertiesNameMap;
typedef QMap<IconHandle, QString> IconPropertiesNameMap;
typedef QMap<SizePolicyHandle, QString> SizePolicyNameMap;
using FontPropertiesNameMap = QMap<FontHandle, QString>;
using IconPropertiesNameMap = QMap<IconHandle, QString>;
using SizePolicyNameMap = QMap<SizePolicyHandle, QString>;
FontPropertiesNameMap m_fontPropertiesNameMap;
IconPropertiesNameMap m_iconPropertiesNameMap;
SizePolicyNameMap m_sizePolicyNameMap;

View File

@ -62,7 +62,7 @@ public:
bool isCustomWidgetContainer(const QString &className) const;
private:
typedef QMap<QString, DomCustomWidget*> NameCustomWidgetMap;
using NameCustomWidgetMap = QMap<QString, DomCustomWidget*>;
NameCustomWidgetMap m_customWidgets;
};

View File

@ -101,7 +101,7 @@ struct TreeWalker
virtual void acceptTime(DomTime *time);
virtual void acceptDateTime(DomDateTime *dateTime);
virtual void acceptProperty(DomProperty *property);
typedef QVector<DomWidget *> DomWidgets;
using DomWidgets = QVector<DomWidget *>;
virtual void acceptIncludes(DomIncludes *includes);
virtual void acceptInclude(DomInclude *incl);
virtual void acceptAction(DomAction *action);