Commit a3b017cc authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

calculatorrunner: Fix mixed hex+decimal calculations

BUG: 431362
FIXED-IN: 5.21.1
parent c8395e7a
......@@ -231,7 +231,7 @@ void CalculatorRunner::match(Plasma::RunnerContext &context)
bool toHex = cmd.startsWith(QLatin1String("hex="));
bool startsWithEquals = !toHex && cmd[0] == QLatin1Char('=');
const static QRegularExpression hexRegex(QStringLiteral("^=?0x.+"), QRegularExpression::CaseInsensitiveOption);
const static QRegularExpression hexRegex(QStringLiteral("0x[0-9a-f]+"), QRegularExpression::CaseInsensitiveOption);
const bool parseHex = cmd.contains(hexRegex);
if (!parseHex) {
userFriendlyMultiplication(cmd);
......
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