Fixed crash when opening ui files in design mode

QML Designer now listens to contextChanged signal instead of
modeChanged and checks that the context is same as that of qmldesigner.

Reviewed-by: con
This commit is contained in:
Lasse Holmstedt
2010-03-26 12:39:26 +01:00
parent 4f4bbe9828
commit 0befb98c20
4 changed files with 26 additions and 12 deletions

View File

@@ -174,6 +174,11 @@ QStringList DesignMode::registeredMimeTypes() const
return rc;
}
/**
* Registers a widget to be displayed when an editor with a file specified in
* mimeTypes is opened. This also appends the additionalContext in ICore to
* the context, specified here.
*/
void DesignMode::registerDesignWidget(QWidget *widget,
const QStringList &mimeTypes,
const QList<int> &context,