forked from qt-creator/qt-creator
Help: Move resolution of help from multiple candidate IDs to HelpItem
No need for code duplication. Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -71,7 +71,7 @@ void CMakeEditor::contextHelp(const HelpCallback &callback) const
|
||||
break;
|
||||
chr = characterAt(pos);
|
||||
if (chr == QLatin1Char('(')) {
|
||||
callback(QString());
|
||||
callback({});
|
||||
return;
|
||||
}
|
||||
} while (chr.unicode() != QChar::ParagraphSeparator);
|
||||
@@ -97,12 +97,12 @@ void CMakeEditor::contextHelp(const HelpCallback &callback) const
|
||||
|
||||
// Not a command
|
||||
if (chr != QLatin1Char('(')) {
|
||||
callback(QString());
|
||||
callback({});
|
||||
return;
|
||||
}
|
||||
|
||||
QString command = textAt(begin, end - begin).toLower();
|
||||
callback(QString("command/" + command));
|
||||
const QString id = "command/" + textAt(begin, end - begin).toLower();
|
||||
callback(id);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user