Design mode: Give IEditor a 'preferred mode'.

... and switch to it in EditorManager::activateEditor.
There no longer is a need for special currentEditorChanged()
handling in the editor that use a special mode.

QmlDesigner receives an additional setting specifying the
desired edit mode. QmlJSEditor detects whether QmlDesigner
is present by checking the registered mimetypes of the
Design mode and retrieves the settings via keys.

Remove some obsolete code and clean up includes
on qmldesignerconstants.h

Reviewed-by: con
This commit is contained in:
Friedemann Kleint
2010-03-16 16:51:45 +01:00
parent 3357458101
commit 2edcc7ef33
18 changed files with 113 additions and 41 deletions

View File

@@ -78,6 +78,9 @@ public:
void registerDesignWidget(QWidget *widget, const QStringList &mimeTypes,
bool preferDesignMode = false);
void unregisterDesignWidget(QWidget *widget);
QStringList registeredMimeTypes() const;
// IContext
QList<int> context() const;
QWidget *widget();