mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
DolphinQt: Migrate QRegExp over to QRegularExpression
Qt 5.0 introduced QRegularExpression to replace QRegExp. In Qt 6.0, QRegExp is removed entirely in favor of it.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPushButton>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
@ -51,8 +51,8 @@ QString GetExpressionForControl(const QString& control_name,
|
||||
|
||||
if (quote == Quote::On)
|
||||
{
|
||||
QRegExp reg(QStringLiteral("[a-zA-Z]+"));
|
||||
if (!reg.exactMatch(expr))
|
||||
const QRegularExpression reg(QStringLiteral("[a-zA-Z]+"));
|
||||
if (!reg.match(expr).hasMatch())
|
||||
expr = QStringLiteral("`%1`").arg(expr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user