aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-01-28 13:00:03 +0100
committerEike Ziller <eike.ziller@qt.io>2019-02-01 11:28:02 +0000
commit443931c1daa7e1cc6ddb74f53e04a2e35c6fecb0 (patch)
tree02e343211287557730d849214f3befee3e386985 /src/plugins/cmakeprojectmanager/cmakeeditor.cpp
parent1f4b733cc1e079ccb9eaf11d13a65c20a19d882d (diff)
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeeditor.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
index 0ec89ba631..042cb363c8 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
@@ -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);
}
//