Commit 5c28ba05 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix clazy-detaching-temporary issues - change [] to .at()

parent 92346e9f
......@@ -370,22 +370,23 @@ QList<KeyboardTranslatorReader::Token> KeyboardTranslatorReader::tokenize(const
if (title.exactMatch(text)) {
Token titleToken = { Token::TitleKeyword , QString() };
Token textToken = { Token::TitleText , title.capturedTexts()[1] };
Token textToken = { Token::TitleText , title.capturedTexts().at(1) };
list << titleToken << textToken;
} else if (key.exactMatch(text)) {
Token keyToken = { Token::KeyKeyword , QString() };
Token sequenceToken = { Token::KeySequence , key.capturedTexts()[1].remove(' ') };
QString sequenceTokenString = key.capturedTexts().at(1);
Token sequenceToken = { Token::KeySequence , sequenceTokenString.remove(QChar(' ')) };
list << keyToken << sequenceToken;
if (key.capturedTexts()[3].isEmpty()) {
// capturedTexts()[2] is a command
Token commandToken = { Token::Command , key.capturedTexts()[2] };
if (key.capturedTexts().at(3).isEmpty()) {
// capturedTexts().at(2) is a command
Token commandToken = { Token::Command , key.capturedTexts().at(2) };
list << commandToken;
} else {
// capturedTexts()[3] is the output string
Token outputToken = { Token::OutputText , key.capturedTexts()[3] };
// capturedTexts().at(3) is the output string
Token outputToken = { Token::OutputText , key.capturedTexts().at(3) };
list << outputToken;
}
} else {
......
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