mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -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:
@ -11,6 +11,7 @@
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpression>
|
||||
#include <QScrollBar>
|
||||
#include <QStringListModel>
|
||||
#include <QTextCursor>
|
||||
@ -161,7 +162,7 @@ void GameConfigEdit::AddBoolOption(QMenu* menu, const QString& name, const QStri
|
||||
void GameConfigEdit::SetOption(const QString& section, const QString& key, const QString& value)
|
||||
{
|
||||
auto section_cursor =
|
||||
m_edit->document()->find(QRegExp(QStringLiteral("^\\[%1\\]").arg(section)), 0);
|
||||
m_edit->document()->find(QRegularExpression(QStringLiteral("^\\[%1\\]").arg(section)), 0);
|
||||
|
||||
// Check if the section this belongs in can be found
|
||||
if (section_cursor.isNull())
|
||||
@ -170,8 +171,8 @@ void GameConfigEdit::SetOption(const QString& section, const QString& key, const
|
||||
}
|
||||
else
|
||||
{
|
||||
auto value_cursor =
|
||||
m_edit->document()->find(QRegExp(QStringLiteral("^%1 = .*").arg(key)), section_cursor);
|
||||
auto value_cursor = m_edit->document()->find(
|
||||
QRegularExpression(QStringLiteral("^%1 = .*").arg(key)), section_cursor);
|
||||
|
||||
const QString new_line = QStringLiteral("%1 = %2").arg(key).arg(value);
|
||||
|
||||
|
Reference in New Issue
Block a user