forked from qt-creator/qt-creator
Help: Make a difference between "empty" and "valid"
Context help should take the HelpItem from the tool tip if it was set, even if it isn't valid. Similarly, if the help item was set on the text editor, it should not ask the hover handlers (again), even if that is invalid Change-Id: I481f8ad73c3cf8fdbb90f737ab36b4e380467026 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -8008,7 +8008,7 @@ void BaseTextEditor::setContextHelp(const HelpItem &item)
|
||||
|
||||
void TextEditorWidget::contextHelpItem(const IContext::HelpCallback &callback)
|
||||
{
|
||||
if (!d->m_contextHelpItem.isValid() && !d->m_hoverHandlers.isEmpty()) {
|
||||
if (d->m_contextHelpItem.isEmpty() && !d->m_hoverHandlers.isEmpty()) {
|
||||
d->m_hoverHandlers.first()->contextHelpId(this,
|
||||
Text::wordStartCursor(textCursor()).position(),
|
||||
callback);
|
||||
|
||||
Reference in New Issue
Block a user