mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Merge pull request #9487 from iwubcode/qt_regex_regression
DolphinQt: Fix regression in input expressions
This commit is contained in:
commit
7250d6e4e0
@ -51,8 +51,10 @@ QString GetExpressionForControl(const QString& control_name,
|
||||
|
||||
if (quote == Quote::On)
|
||||
{
|
||||
const QRegularExpression reg(QStringLiteral("[a-zA-Z]+"));
|
||||
if (!reg.match(expr).hasMatch())
|
||||
// If our expression contains any non-alpha characters
|
||||
// we should quote it
|
||||
const QRegularExpression reg(QStringLiteral("[^a-zA-Z]"));
|
||||
if (reg.match(expr).hasMatch())
|
||||
expr = QStringLiteral("`%1`").arg(expr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user