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:
Eike Ziller
2019-01-28 11:58:53 +01:00
parent c9cdca105c
commit 1ee005aef4
17 changed files with 31 additions and 31 deletions

View File

@@ -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)
m_formEditorView->contextHelpId(callback);
m_formEditorView->contextHelp(callback);
else
callback(QString());
callback({});
}
void FormEditorWidget::setRootItemRect(const QRectF &rect)

View File

@@ -64,7 +64,7 @@ public:
double spacing() 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);
QRectF rootItemRect() const;

View File

@@ -661,10 +661,10 @@ void DesignDocument::updateCurrentProject()
viewManager().setNodeInstanceViewProject(currentProject);
}
void DesignDocument::contextHelpId(const Core::IContext::HelpCallback &callback) const
void DesignDocument::contextHelp(const Core::IContext::HelpCallback &callback) const
{
if (view())
view()->contextHelpId(callback);
view()->contextHelp(callback);
else
callback(QString());
}

View File

@@ -77,7 +77,7 @@ public:
Model *currentModel() const;
Model *documentModel() const;
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
void contextHelp(const Core::IContext::HelpCallback &callback) const;
QList<DocumentMessage> qmlParseWarnings() const;
bool hasQmlParseWarnings() const;
QList<DocumentMessage> qmlParseErrors() const;

View File

@@ -158,10 +158,10 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
return buttons;
}
void NavigatorWidget::contextHelpId(const Core::IContext::HelpCallback &callback) const
void NavigatorWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
{
if (navigatorView())
navigatorView()->contextHelpId(callback);
navigatorView()->contextHelp(callback);
else
callback(QString());
}

View File

@@ -48,7 +48,7 @@ public:
void setTreeModel(QAbstractItemModel *model);
QTreeView *treeView() const;
QList<QToolButton *> createToolBarWidgets();
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
void contextHelp(const Core::IContext::HelpCallback &callback) const;
void disableNavigator();
void enableNavigator();

View File

@@ -152,12 +152,12 @@ WidgetInfo TextEditorView::widgetInfo()
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())
m_widget->textEditor()->contextHelp(callback);

View File

@@ -69,9 +69,9 @@ public:
// TextEditorView
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();

View File

@@ -94,9 +94,9 @@ void TextEditorWidget::setTextEditor(TextEditor::BaseTextEditor *textEditor)
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()

View File

@@ -50,7 +50,7 @@ public:
return m_textEditor.get();
}
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
void contextHelp(const Core::IContext::HelpCallback &callback) const;
void jumpTextCursorToSelectedModelNode();
void gotoCursorPosition(int line, int column);

View File

@@ -257,7 +257,7 @@ public:
virtual void disableWidget();
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 activateTimelineRecording(const ModelNode &timeline);

View File

@@ -96,7 +96,7 @@ public:
void toggleStatesViewExpanded();
void qmlJSEditorHelpId(const Core::IContext::HelpCallback &callback) const;
void qmlJSEditorContextHelp(const Core::IContext::HelpCallback &callback) const;
DesignDocument *currentDesignDocument() const;
bool usesRewriterView(RewriterView *rewriterView);

View File

@@ -577,10 +577,10 @@ void AbstractView::enableWidget()
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
QmlDesignerPlugin::instance()->viewManager().qmlJSEditorHelpId(callback);
QmlDesignerPlugin::instance()->viewManager().qmlJSEditorContextHelp(callback);
#else
callback(QString());
#endif

View File

@@ -424,9 +424,9 @@ void ViewManager::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

View File

@@ -42,7 +42,7 @@ DesignModeContext::DesignModeContext(QWidget *widget)
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)
@@ -54,7 +54,7 @@ FormEditorContext::FormEditorContext(QWidget *widget)
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)
@@ -66,7 +66,7 @@ NavigatorContext::NavigatorContext(QWidget *widget)
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)
@@ -78,7 +78,7 @@ TextEditorContext::TextEditorContext(QWidget *widget)
void TextEditorContext::contextHelp(const HelpCallback &callback) const
{
qobject_cast<TextEditorWidget *>(m_widget)->contextHelpId(callback);
qobject_cast<TextEditorWidget *>(m_widget)->contextHelp(callback);
}
}

View File

@@ -554,10 +554,10 @@ void DesignModeWidget::showInternalTextEditor()
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())
currentDesignDocument()->contextHelpId(callback);
currentDesignDocument()->contextHelp(callback);
else
callback(QString());
}

View File

@@ -61,7 +61,7 @@ public:
DesignModeWidget();
~DesignModeWidget() override;
void contextHelpId(const Core::IContext::HelpCallback &callback) const;
void contextHelp(const Core::IContext::HelpCallback &callback) const;
void initialize();