Browse Source

Syntax sugar for type definition

Alexey Edelev 6 years ago
parent
commit
99e5a52745
2 changed files with 4 additions and 4 deletions
  1. 1 1
      githandler.h
  2. 3 3
      gitrepository.h

+ 1 - 1
githandler.h

@@ -13,7 +13,7 @@ class TagListModel;
 class QFileSystemWatcher;
 class GitConsole;
 
-typedef QHash<QString, QPointer<CommitModel>> CommitModelContainer;
+using CommitModelContainer = QHash<QString, QPointer<CommitModel>>;
 
 class GitHandler : public QObject
 {

+ 3 - 3
gitrepository.h

@@ -17,9 +17,9 @@ class GitCommit;
 class GitRemote;
 struct git_oid;
 
-typedef QMap<QString, QPointer<GitBranch> > BranchContainer;
-typedef QMap<GitOid, QPointer<GitTag> > TagContainer;
-typedef QMap<QString, QPointer<GitRemote> > RemoteContainer;
+using BranchContainer = QMap<QString, QPointer<GitBranch> >;
+using TagContainer = QMap<GitOid, QPointer<GitTag> >;
+using RemoteContainer = QMap<QString, QPointer<GitRemote> >;
 
 class GitRepository : public QObject
 {