Commit 0624d6ec authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QtQuickToolbar: Changes abstract interface of IContextPane

The parameter force now forces the activation of the Quick
ToolBar even if it is not shown by default (enabled).
parent b193b359
......@@ -52,7 +52,7 @@ class QMLJS_EXPORT IContextPane : public QObject
public:
IContextPane(QObject *parent = 0) : QObject(parent) {}
virtual ~IContextPane() {}
virtual void apply(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node, bool update) = 0;
virtual void apply(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node, bool update, bool force = false) = 0;
virtual void setEnabled(bool) = 0;
virtual QWidget* widget() = 0;
};
......
......@@ -66,9 +66,9 @@ QmlContextPane::~QmlContextPane()
m_widget.clear();
}
void QmlContextPane::apply(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node, bool update)
void QmlContextPane::apply(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node, bool update, bool force)
{
if (!Internal::BauhausPlugin::pluginInstance()->settings().enableContextPane)
if (!Internal::BauhausPlugin::pluginInstance()->settings().enableContextPane && !force)
return;
if (doc.isNull())
......
......@@ -28,7 +28,7 @@ class QmlContextPane : public QmlJS::IContextPane
public:
QmlContextPane(QObject *parent = 0);
~QmlContextPane();
void apply(TextEditor::BaseTextEditorEditable *editor, QmlJS::Document::Ptr doc, const QmlJS::Snapshot &snapshot, QmlJS::AST::Node *node, bool update);
void apply(TextEditor::BaseTextEditorEditable *editor, QmlJS::Document::Ptr doc, const QmlJS::Snapshot &snapshot, QmlJS::AST::Node *node, bool update, bool force = 0);
void setProperty(const QString &propertyName, const QVariant &value);
void removeProperty(const QString &propertyName);
void setEnabled(bool);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment