forked from qt-creator/qt-creator
Qt Quick Designer: Adapt to naming change in IContext
Since context help is no longer based solely on an ID. Change-Id: I34bb81b70632df9fb75bdcf28b022418d4aa764b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -333,12 +333,12 @@ double FormEditorWidget::containerPadding() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FormEditorWidget::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void FormEditorWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
if (m_formEditorView)
|
if (m_formEditorView)
|
||||||
m_formEditorView->contextHelpId(callback);
|
m_formEditorView->contextHelp(callback);
|
||||||
else
|
else
|
||||||
callback(QString());
|
callback({});
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorWidget::setRootItemRect(const QRectF &rect)
|
void FormEditorWidget::setRootItemRect(const QRectF &rect)
|
||||||
|
@@ -64,7 +64,7 @@ public:
|
|||||||
double spacing() const;
|
double spacing() const;
|
||||||
double containerPadding() const;
|
double containerPadding() const;
|
||||||
|
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
|
|
||||||
void setRootItemRect(const QRectF &rect);
|
void setRootItemRect(const QRectF &rect);
|
||||||
QRectF rootItemRect() const;
|
QRectF rootItemRect() const;
|
||||||
|
@@ -661,10 +661,10 @@ void DesignDocument::updateCurrentProject()
|
|||||||
viewManager().setNodeInstanceViewProject(currentProject);
|
viewManager().setNodeInstanceViewProject(currentProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesignDocument::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void DesignDocument::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
if (view())
|
if (view())
|
||||||
view()->contextHelpId(callback);
|
view()->contextHelp(callback);
|
||||||
else
|
else
|
||||||
callback(QString());
|
callback(QString());
|
||||||
}
|
}
|
||||||
|
@@ -77,7 +77,7 @@ public:
|
|||||||
Model *currentModel() const;
|
Model *currentModel() const;
|
||||||
Model *documentModel() const;
|
Model *documentModel() const;
|
||||||
|
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
QList<DocumentMessage> qmlParseWarnings() const;
|
QList<DocumentMessage> qmlParseWarnings() const;
|
||||||
bool hasQmlParseWarnings() const;
|
bool hasQmlParseWarnings() const;
|
||||||
QList<DocumentMessage> qmlParseErrors() const;
|
QList<DocumentMessage> qmlParseErrors() const;
|
||||||
|
@@ -158,10 +158,10 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
|
|||||||
return buttons;
|
return buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigatorWidget::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void NavigatorWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
if (navigatorView())
|
if (navigatorView())
|
||||||
navigatorView()->contextHelpId(callback);
|
navigatorView()->contextHelp(callback);
|
||||||
else
|
else
|
||||||
callback(QString());
|
callback(QString());
|
||||||
}
|
}
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
void setTreeModel(QAbstractItemModel *model);
|
void setTreeModel(QAbstractItemModel *model);
|
||||||
QTreeView *treeView() const;
|
QTreeView *treeView() const;
|
||||||
QList<QToolButton *> createToolBarWidgets();
|
QList<QToolButton *> createToolBarWidgets();
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
|
|
||||||
void disableNavigator();
|
void disableNavigator();
|
||||||
void enableNavigator();
|
void enableNavigator();
|
||||||
|
@@ -152,12 +152,12 @@ WidgetInfo TextEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget, nullptr, "TextEditor", WidgetInfo::CentralPane, 0, tr("Text Editor"), DesignerWidgetFlags::IgnoreErrors);
|
return createWidgetInfo(m_widget, nullptr, "TextEditor", WidgetInfo::CentralPane, 0, tr("Text Editor"), DesignerWidgetFlags::IgnoreErrors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorView::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void TextEditorView::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
AbstractView::contextHelpId(callback);
|
AbstractView::contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorView::qmlJSEditorHelpId(const Core::IContext::HelpCallback &callback) const
|
void TextEditorView::qmlJSEditorContextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
if (m_widget->textEditor())
|
if (m_widget->textEditor())
|
||||||
m_widget->textEditor()->contextHelp(callback);
|
m_widget->textEditor()->contextHelp(callback);
|
||||||
|
@@ -69,9 +69,9 @@ public:
|
|||||||
|
|
||||||
// TextEditorView
|
// TextEditorView
|
||||||
WidgetInfo widgetInfo() override;
|
WidgetInfo widgetInfo() override;
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const override;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const override;
|
||||||
|
|
||||||
void qmlJSEditorHelpId(const Core::IContext::HelpCallback &callback) const;
|
void qmlJSEditorContextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *textEditor();
|
TextEditor::BaseTextEditor *textEditor();
|
||||||
|
|
||||||
|
@@ -94,9 +94,9 @@ void TextEditorWidget::setTextEditor(TextEditor::BaseTextEditor *textEditor)
|
|||||||
oldEditor->deleteLater();
|
oldEditor->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorWidget::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void TextEditorWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
m_textEditorView->contextHelpId(callback);
|
m_textEditorView->contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorWidget::updateSelectionByCursorPosition()
|
void TextEditorWidget::updateSelectionByCursorPosition()
|
||||||
|
@@ -50,7 +50,7 @@ public:
|
|||||||
return m_textEditor.get();
|
return m_textEditor.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
void jumpTextCursorToSelectedModelNode();
|
void jumpTextCursorToSelectedModelNode();
|
||||||
void gotoCursorPosition(int line, int column);
|
void gotoCursorPosition(int line, int column);
|
||||||
|
|
||||||
|
@@ -257,7 +257,7 @@ public:
|
|||||||
virtual void disableWidget();
|
virtual void disableWidget();
|
||||||
virtual void enableWidget();
|
virtual void enableWidget();
|
||||||
|
|
||||||
virtual void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
virtual void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
|
|
||||||
void activateTimeline(const ModelNode &timeline);
|
void activateTimeline(const ModelNode &timeline);
|
||||||
void activateTimelineRecording(const ModelNode &timeline);
|
void activateTimelineRecording(const ModelNode &timeline);
|
||||||
|
@@ -96,7 +96,7 @@ public:
|
|||||||
|
|
||||||
void toggleStatesViewExpanded();
|
void toggleStatesViewExpanded();
|
||||||
|
|
||||||
void qmlJSEditorHelpId(const Core::IContext::HelpCallback &callback) const;
|
void qmlJSEditorContextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
DesignDocument *currentDesignDocument() const;
|
DesignDocument *currentDesignDocument() const;
|
||||||
|
|
||||||
bool usesRewriterView(RewriterView *rewriterView);
|
bool usesRewriterView(RewriterView *rewriterView);
|
||||||
|
@@ -577,10 +577,10 @@ void AbstractView::enableWidget()
|
|||||||
widgetInfo().widget->setEnabled(true);
|
widgetInfo().widget->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractView::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void AbstractView::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
QmlDesignerPlugin::instance()->viewManager().qmlJSEditorHelpId(callback);
|
QmlDesignerPlugin::instance()->viewManager().qmlJSEditorContextHelp(callback);
|
||||||
#else
|
#else
|
||||||
callback(QString());
|
callback(QString());
|
||||||
#endif
|
#endif
|
||||||
|
@@ -424,9 +424,9 @@ void ViewManager::toggleStatesViewExpanded()
|
|||||||
d->statesEditorView.toggleStatesViewExpanded();
|
d->statesEditorView.toggleStatesViewExpanded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::qmlJSEditorHelpId(const Core::IContext::HelpCallback &callback) const
|
void ViewManager::qmlJSEditorContextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
d->textEditorView.qmlJSEditorHelpId(callback);
|
d->textEditorView.qmlJSEditorContextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
Model *ViewManager::currentModel() const
|
Model *ViewManager::currentModel() const
|
||||||
|
@@ -42,7 +42,7 @@ DesignModeContext::DesignModeContext(QWidget *widget)
|
|||||||
|
|
||||||
void DesignModeContext::contextHelp(const HelpCallback &callback) const
|
void DesignModeContext::contextHelp(const HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
qobject_cast<DesignModeWidget *>(m_widget)->contextHelpId(callback);
|
qobject_cast<DesignModeWidget *>(m_widget)->contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
FormEditorContext::FormEditorContext(QWidget *widget)
|
FormEditorContext::FormEditorContext(QWidget *widget)
|
||||||
@@ -54,7 +54,7 @@ FormEditorContext::FormEditorContext(QWidget *widget)
|
|||||||
|
|
||||||
void FormEditorContext::contextHelp(const HelpCallback &callback) const
|
void FormEditorContext::contextHelp(const HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
qobject_cast<FormEditorWidget *>(m_widget)->contextHelpId(callback);
|
qobject_cast<FormEditorWidget *>(m_widget)->contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigatorContext::NavigatorContext(QWidget *widget)
|
NavigatorContext::NavigatorContext(QWidget *widget)
|
||||||
@@ -66,7 +66,7 @@ NavigatorContext::NavigatorContext(QWidget *widget)
|
|||||||
|
|
||||||
void NavigatorContext::contextHelp(const HelpCallback &callback) const
|
void NavigatorContext::contextHelp(const HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
qobject_cast<NavigatorWidget *>(m_widget)->contextHelpId(callback);
|
qobject_cast<NavigatorWidget *>(m_widget)->contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditorContext::TextEditorContext(QWidget *widget)
|
TextEditorContext::TextEditorContext(QWidget *widget)
|
||||||
@@ -78,7 +78,7 @@ TextEditorContext::TextEditorContext(QWidget *widget)
|
|||||||
|
|
||||||
void TextEditorContext::contextHelp(const HelpCallback &callback) const
|
void TextEditorContext::contextHelp(const HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
qobject_cast<TextEditorWidget *>(m_widget)->contextHelpId(callback);
|
qobject_cast<TextEditorWidget *>(m_widget)->contextHelp(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -554,10 +554,10 @@ void DesignModeWidget::showInternalTextEditor()
|
|||||||
m_centralTabWidget->switchTo(viewManager().widget("TextEditor"));
|
m_centralTabWidget->switchTo(viewManager().widget("TextEditor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesignModeWidget::contextHelpId(const Core::IContext::HelpCallback &callback) const
|
void DesignModeWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||||
{
|
{
|
||||||
if (currentDesignDocument())
|
if (currentDesignDocument())
|
||||||
currentDesignDocument()->contextHelpId(callback);
|
currentDesignDocument()->contextHelp(callback);
|
||||||
else
|
else
|
||||||
callback(QString());
|
callback(QString());
|
||||||
}
|
}
|
||||||
|
@@ -61,7 +61,7 @@ public:
|
|||||||
DesignModeWidget();
|
DesignModeWidget();
|
||||||
~DesignModeWidget() override;
|
~DesignModeWidget() override;
|
||||||
|
|
||||||
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
|
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user