summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-04 12:58:35 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-04 12:58:35 (GMT)
commit3c991df1681471cbfb737f6bed0c679e5ca67aa9 (patch)
tree83e18394a3b2f0a4d59c3b46871daaeb9c9f3dd1 /src
parenta9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (diff)
downloadQt-3c991df1681471cbfb737f6bed0c679e5ca67aa9.zip
Qt-3c991df1681471cbfb737f6bed0c679e5ca67aa9.tar.gz
Qt-3c991df1681471cbfb737f6bed0c679e5ca67aa9.tar.bz2
uic: Fixed code generating setCentralWidget()-calls of QMainWindow.
Regression introduced by QTBUG-5824 change 6809bd020e3307324e136707f32f6f17f77b9591. Do not generate setCentralWidget() for Qt3Support toolbar/dock widget classes. Reviewed-by: ogoffart <olivier.goffart@nokia.com> Task-number: QTBUG-7612
Diffstat (limited to 'src')
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 8099ffa..dc1d181 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -721,8 +721,9 @@ void WriteInitialization::acceptWidget(DomWidget *node)
m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n";
} else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) {
m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n";
- } else {
- m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n";
+ } else if (!m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3DockWindow"))
+ && !m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3ToolBar"))) {
+ m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n";
}
}