summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteincludes.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-05-27 13:25:50 (GMT)
committerLiang Qi <liang.qi@nokia.com>2011-05-27 13:25:50 (GMT)
commit9e4ded47bc9e3fed3ee2a15e572603bb3f7b48fc (patch)
tree09a609ee6f560390d7385e524421d16d6d43f083 /src/tools/uic/cpp/cppwriteincludes.cpp
parentc09b481edd82942cdc85d138c2160004bd71a54e (diff)
parent271a96f201ebcd346bb532e207c1d0e465f89584 (diff)
downloadQt-9e4ded47bc9e3fed3ee2a15e572603bb3f7b48fc.zip
Qt-9e4ded47bc9e3fed3ee2a15e572603bb3f7b48fc.tar.gz
Qt-9e4ded47bc9e3fed3ee2a15e572603bb3f7b48fc.tar.bz2
Merge branch '4.8' into qt-4.8-from-4.7
Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtOpenGLu.def
Diffstat (limited to 'src/tools/uic/cpp/cppwriteincludes.cpp')
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 748d918..0be3385 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -82,7 +82,7 @@ static inline QString moduleHeader(const QString &module, const QString &header)
namespace CPP {
WriteIncludes::WriteIncludes(Uic *uic)
- : m_uic(uic), m_output(uic->output()), m_scriptsActivated(false)
+ : m_uic(uic), m_output(uic->output()), m_scriptsActivated(false), m_laidOut(false)
{
// When possible (no namespace) use the "QtModule/QClass" convention
// and create a re-mapping of the old header "qclass.h" to it. Do not do this
@@ -106,6 +106,7 @@ WriteIncludes::WriteIncludes(Uic *uic)
void WriteIncludes::acceptUI(DomUI *node)
{
m_scriptsActivated = false;
+ m_laidOut = false;
m_localIncludes.clear();
m_globalIncludes.clear();
m_knownClasses.clear();
@@ -160,6 +161,7 @@ void WriteIncludes::acceptWidget(DomWidget *node)
void WriteIncludes::acceptLayout(DomLayout *node)
{
add(node->attributeClass());
+ m_laidOut = true;
TreeWalker::acceptLayout(node);
}
@@ -236,6 +238,9 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS
m_knownClasses.insert(className);
+ if (!m_laidOut && m_uic->customWidgetsInfo()->extends(className, QLatin1String("QToolBox")))
+ add(QLatin1String("QLayout")); // spacing property of QToolBox)
+
if (className == QLatin1String("Line")) { // ### hmm, deprecate me!
add(QLatin1String("QFrame"));
return;