diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-15 13:31:21 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-02 11:37:36 +0000 |
commit | 9cd021f517e55abc31b3fd9e405ea94ce9eda44d (patch) | |
tree | ae386764b2443017f9cf08bab9c9c9b5319c3c38 /src/tools/uic/driver.h | |
parent | 758f47eb5d2aef2e52c43332fa09699180f63608 (diff) |
uic: Refactor reverse name lookup
Add a helper routine to look up the dom classes by attribute name and
change Driver::widgetByName() and Driver::actionByName() to use that
as does Driver::actionGroupByName() (all these functions are called
with names from the XML files).
Remove the name normalization in
WriteInitialization::findDeclaration() and refactor
WriteInitialization::acceptActionRef() to call findOrInsert() to
correctly use the unique name.
Task-number: PYSIDE-797
Change-Id: I34058361964719c442182faf798f055f11b40412
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'src/tools/uic/driver.h')
-rw-r--r-- | src/tools/uic/driver.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/uic/driver.h b/src/tools/uic/driver.h index 69206e1608..1e50f78746 100644 --- a/src/tools/uic/driver.h +++ b/src/tools/uic/driver.h @@ -95,6 +95,9 @@ private: template <class DomClass> using DomObjectHash = QHash<const DomClass *, QString>; template <class DomClass> + const DomClass *findByAttributeName(const DomObjectHash<DomClass> &domHash, + const QString &name) const; + template <class DomClass> QString findOrInsert(DomObjectHash<DomClass> *domHash, const DomClass *dom, const QString &className); Option m_option; |