diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-04 12:58:35 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-02-06 09:16:49 (GMT) |
commit | 5fbd68afae426187f1671a6913cc2a65cc70ff37 (patch) | |
tree | bc793d21227813ab8cc998000a16284ff0719830 | |
parent | d65e987d5a38147b39b08a01ac30be8186d315a1 (diff) | |
download | Qt-5fbd68afae426187f1671a6913cc2a65cc70ff37.zip Qt-5fbd68afae426187f1671a6913cc2a65cc70ff37.tar.gz Qt-5fbd68afae426187f1671a6913cc2a65cc70ff37.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
(cherry picked from commit 3c991df1681471cbfb737f6bed0c679e5ca67aa9)
-rw-r--r-- | src/tools/uic/cpp/cppwriteinitialization.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 5ec7e30..fb5e820 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"; } } |