Merge pull request #9440 from lioncash/qt6

DolphinQt: Qt 6.0 forward-compatibility changes
This commit is contained in:
Léo Lam
2021-01-27 19:28:43 +01:00
committed by GitHub
12 changed files with 44 additions and 31 deletions

View File

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