Merge remote-tracking branch 'origin/4.6'

Conflicts:
	qtcreator.pri

Change-Id: I7dcd8e067b7597144eb3b27d917cb7fe0279aad4
This commit is contained in:
Eike Ziller
2018-01-19 12:05:11 +01:00
47 changed files with 236 additions and 136 deletions

View File

@@ -61,7 +61,7 @@ namespace Internal {
// CMakeEditor
//
QString CMakeEditor::contextHelpId() const
void CMakeEditor::contextHelpId(const HelpIdCallback &callback) const
{
int pos = position();
@@ -71,8 +71,10 @@ QString CMakeEditor::contextHelpId() const
if (pos < 0)
break;
chr = characterAt(pos);
if (chr == QLatin1Char('('))
return QString();
if (chr == QLatin1Char('(')) {
callback(QString());
return;
}
} while (chr.unicode() != QChar::ParagraphSeparator);
++pos;
@@ -95,11 +97,13 @@ QString CMakeEditor::contextHelpId() const
}
// Not a command
if (chr != QLatin1Char('('))
return QString();
if (chr != QLatin1Char('(')) {
callback(QString());
return;
}
QString command = textAt(begin, end - begin).toLower();
return QLatin1String("command/") + command;
callback(QLatin1String("command/") + command);
}
//

View File

@@ -38,7 +38,7 @@ class CMakeEditor : public TextEditor::BaseTextEditor
Q_OBJECT
public:
QString contextHelpId() const override;
void contextHelpId(const HelpIdCallback &callback) const override;
friend class CMakeEditorWidget;
};