1
0
Fork 0
forked from len0rd/rockbox

themeeditor: Get rid of another pile of deprecation warnings

Change-Id: Ifc6274d7f2f0de85db7b652f479ba7f9b7ef86bb
This commit is contained in:
Solomon Peachy 2024-12-04 15:45:36 -05:00
parent a565734e47
commit c24862ab64
5 changed files with 17 additions and 18 deletions

View file

@ -5,7 +5,7 @@
#include <QtGui>
#include <QTextEdit>
#include <QRegExp>
#include <QRegularExpression>
#include <QSettings>
#include "varianteditor.h"
@ -96,8 +96,8 @@ void FindReplaceForm::validateRegExp(const QString &text) {
return; // nothing to validate
}
QRegExp reg(text,
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
QRegularExpression reg(text,
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
if (reg.isValid()) {
showError("");
@ -151,8 +151,8 @@ void FindReplaceForm::find(bool next) {
flags |= QTextDocument::FindWholeWords;
if (ui->regexCheckBox->isChecked()) {
QRegExp reg(toSearch,
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
QRegularExpression reg(toSearch,
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
qDebug() << "searching for regexp: " << reg.pattern();