From abc024eef78cfc84a577ce9f1638c5b6dc4d101b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 31 Jul 2018 16:03:59 +0200 Subject: uic: Fix clang-tidy warnings - Simplify/streamline if statmenents - Change else if to if after return/break/continue - Use isEmpty() for containers instead of checking size() - Replace index-based loops by range-based for Change-Id: I008228a99082a4d0e27be9f6c6af392602140b2f Reviewed-by: Jarek Kobus --- src/tools/uic/cpp/cppwriteinitialization.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/tools/uic/cpp/cppwriteinitialization.h') diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h index 2ba0b1352a7..e6950a00ea3 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.h +++ b/src/tools/uic/cpp/cppwriteinitialization.h @@ -161,6 +161,7 @@ private: // special initialization // class Item { + Q_DISABLE_COPY(Item) public: Item(const QString &itemClassName, const QString &indent, QTextStream &setupUiStream, QTextStream &retranslateUiStream, Driver *driver); ~Item(); @@ -176,15 +177,15 @@ private: int setupUiCount() const { return m_setupUiData.setters.count(); } int retranslateUiCount() const { return m_retranslateUiData.setters.count(); } private: - struct ItemData { - ItemData() : policy(DontGenerate) {} + struct ItemData + { QMultiMap setters; // directive to setter QSet directives; enum TemporaryVariableGeneratorPolicy { // policies with priority, number describes the priority DontGenerate = 1, GenerateWithMultiDirective = 2, Generate = 3 - } policy; + } policy = DontGenerate; }; ItemData m_setupUiData; ItemData m_retranslateUiData; -- cgit v1.2.3