mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00: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:
parent
765a1b3c09
commit
46ca371ef3
3 changed files with 16 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue