Use QString::midRef

GIT_SILENT
parent 3faa0387
......@@ -247,7 +247,7 @@ QString ProblemNavigationContext::html(bool shorten)
NavigationContextPointer ProblemNavigationContext::executeKeyAction(const QString& key)
{
if (key.startsWith(QLatin1String("invoke_action_"))) {
const int index = QString(key).remove(QLatin1String("invoke_action_")).toInt();
const int index = key.midRef(strlen("invoke_action_")).toInt();
executeAction(index);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment