Webbrowser example: Fix crash due to deprecated code.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Thu, 20 Feb 2014 09:24:22 +0000 (10:24 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 20 Feb 2014 15:25:29 +0000 (16:25 +0100)
commiteefff4ac4b6915485d6362536fe0907820a68982
treeb09796f8c861b4b999315606207947ddbda04435
parent8dc37368441d13f41f029b4191ce734a9758d2c8
Webbrowser example: Fix crash due to deprecated code.

The example uses a Qt Designer form with widgets on a QToolBar
imported from Qt 3 which is not supported in Qt 4 and later.

In the code generated by uic, a QLabel is constructed passing
the toolbar as parent and added to the toolbar using
QToolBar::addWidget() which then causes a crash in Qt 4.

Move the widgets from the form into the class to avoid this.

Task-number: QTBUG-36948

Change-Id: Ia4af871ce99faf555bebc6ebde19bcae0de4d29e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtactiveqt/2e44efa5056355ac2c069ad2bd8a8ba6562f3eb6)
examples/activeqt/webbrowser/main.cpp
examples/activeqt/webbrowser/mainwindow.ui
examples/activeqt/webbrowser/mainwindow_windowsmobile.ui