diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-22 08:05:11 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-22 08:05:11 (GMT) |
commit | ab1b7f137350d6eeafec2a64e3c25a4b02be65a9 (patch) | |
tree | 1439d507ee9cb04663cfde0b2ca825eb1b9a82c3 /tools/designer/src/lib/shared/newformwidget.cpp | |
parent | f9d26f0bebd5bcc32d15c4a627251c44cf78389e (diff) | |
download | Qt-ab1b7f137350d6eeafec2a64e3c25a4b02be65a9.zip Qt-ab1b7f137350d6eeafec2a64e3c25a4b02be65a9.tar.gz Qt-ab1b7f137350d6eeafec2a64e3c25a4b02be65a9.tar.bz2 |
Enabled the use of promoted widgets in new form templates.
The form builder used for preview of the templates did not implement
custom widget handling (FormBuilder::createCustomWidgets()).
On encountering a promoted widget, the widget factory
would then create a Widget Database entry specifying QWidget
inheritance (emergency fallback) which could not be overidden later
on.
To fix this, moved the code for handling custom widgets from
QDesignerResource to QSimpleResource and create a new
formbuilder class that handles it especially for the New Form Dialog
preview.
Task-number: 254282
Diffstat (limited to 'tools/designer/src/lib/shared/newformwidget.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/newformwidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/designer/src/lib/shared/newformwidget.cpp b/tools/designer/src/lib/shared/newformwidget.cpp index d79d77a..503e597 100644 --- a/tools/designer/src/lib/shared/newformwidget.cpp +++ b/tools/designer/src/lib/shared/newformwidget.cpp @@ -310,9 +310,8 @@ QImage NewFormWidget::grabForm(QDesignerFormEditorInterface *core, const QString &workingDir, const qdesigner_internal::DeviceProfile &dp) { - qdesigner_internal::QDesignerFormBuilder formBuilder(core, - qdesigner_internal::QDesignerFormBuilder::DisableScripts, - dp); + qdesigner_internal::NewFormWidgetFormBuilder + formBuilder(core, qdesigner_internal::QDesignerFormBuilder::DisableScripts, dp); if (!workingDir.isEmpty()) formBuilder.setWorkingDirectory(workingDir); |