summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 809cac6bef..853a306721 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -108,7 +108,8 @@ void WriteIncludes::acceptUI(DomUI *node)
add(QLatin1String("QVariant"));
add(QLatin1String("QAction"));
- add(QLatin1String("QButtonGroup")); // ### only if it is really necessary
+ if (node->elementButtonGroups())
+ add(QLatin1String("QButtonGroup"));
TreeWalker::acceptUI(node);