calculatorrunner: Fix mixed hex+decimal calculations

BUG: 431362
FIXED-IN: 5.21.1
wilder-5.22
Alexander Lohnau 5 years ago
parent 1a6848cfce
commit ef4d5d0f68
  1. 2
      runners/calculator/calculatorrunner.cpp

@ -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);

Loading…
Cancel
Save