diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-07-05 19:11:04 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:17 -0300 |
commit | 2cc6e2afa7b9845ccfc62b9dce72b498034e8de9 (patch) | |
tree | ae6f0d89c25cd95233010dfab80f3af74bf79de4 /typedatabase.cpp | |
parent | 31df158c68385c300f6c9b7cb0fe06bb3a789300 (diff) |
Added revision attribute to type entries tags and flags-revision to enum-type tag.
These attributes will be useful to separate the wrapped API in revisions and ease
the task of producing ABI compatible bindings.
Diffstat (limited to 'typedatabase.cpp')
-rw-r--r-- | typedatabase.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/typedatabase.cpp b/typedatabase.cpp index 5ba658bd7..338c40394 100644 --- a/typedatabase.cpp +++ b/typedatabase.cpp @@ -415,3 +415,17 @@ void TypeDatabase::setDropTypeEntries(QStringList dropTypeEntries) m_dropTypeEntries.sort(); } +typedef QHash<TypeEntry*, int> TypeRevisionMap; +Q_GLOBAL_STATIC(TypeRevisionMap, typeRevisions); + +int getTypeRevision(TypeEntry* typeEntry) +{ + return typeRevisions()->value(typeEntry); +} + +void setTypeRevision(TypeEntry* typeEntry, int revision) +{ + typeRevisions()->insert(typeEntry, revision); +} + + |