QmlJSEditor: Use EditorWidget instead of Editor in QuickToolBar

This reduces the use of the 'editor()' "back link" which we'd like
to phase out (and also actually simplifies the user code).

Change-Id: I8aa13e88459d4e9cf44de683e8efd189238cc684
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
hjk
2014-09-01 12:54:03 +02:00
parent a59fdc8096
commit c587f0b241
4 changed files with 36 additions and 39 deletions

View File

@@ -37,7 +37,7 @@
#include <qmljs/qmljsdocument.h>
#include <qmljs/parser/qmljsastfwd_p.h>
namespace TextEditor { class BaseTextEditor; }
namespace TextEditor { class BaseTextEditorWidget; }
namespace QmlJS {
@@ -50,9 +50,9 @@ class QMLJS_EXPORT IContextPane : public QObject
public:
IContextPane(QObject *parent = 0) : QObject(parent) {}
virtual ~IContextPane() {}
virtual void apply(TextEditor::BaseTextEditor *editor, Document::Ptr document, const ScopeChain *scopeChain, AST::Node *node, bool update, bool force = false) = 0;
virtual void apply(TextEditor::BaseTextEditorWidget *editorWidget, Document::Ptr document, const ScopeChain *scopeChain, AST::Node *node, bool update, bool force = false) = 0;
virtual void setEnabled(bool) = 0;
virtual bool isAvailable(TextEditor::BaseTextEditor *editor, Document::Ptr document, AST::Node *node) = 0;
virtual bool isAvailable(TextEditor::BaseTextEditorWidget *editorWidget, Document::Ptr document, AST::Node *node) = 0;
virtual QWidget* widget() = 0;
signals:
void closed();