Replace QRegExp with QRegularExpression (#7133)

* replace QRegExp with QRegularExpression (find n replace)

* follow up to fix errors

* removed rpmalloc

* Fix compilation for qt5, to be fixed when qt6 fully supported.

Co-authored-by: Kevin Zander <veratil@gmail.com>

* Added QtGlobal header for version finding fix

* Use the other syntax to try fix compilation.

* Check for 5.12 instead.

* Fix the header

* Attempt at fixing it further.

* Use version checks properly in header file

* Use QT_VERSION_CHECK macro in sources

* Apply suggestions from messmerd's review

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>

---------

Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
This commit is contained in:
Rossmaxx
2024-03-16 11:04:01 +05:30
committed by GitHub
parent b9ebc24e13
commit 4120a04d0b
13 changed files with 46 additions and 27 deletions

View File

@@ -35,6 +35,7 @@
#include <QFileInfo>
#include <QDir>
#include <QMessageBox>
#include <QRegularExpression>
#include <QSaveFile>
#include "base64.h"
@@ -973,8 +974,7 @@ void DataFile::upgrade_0_4_0_20080622()
{
QDomElement el = list.item( i ).toElement();
QString s = el.attribute( "name" );
s.replace( QRegExp( "^Beat/Baseline " ),
"Beat/Bassline " );
s.replace(QRegularExpression("^Beat/Baseline "), "Beat/Bassline");
el.setAttribute( "name", s );
}
}
@@ -1109,7 +1109,7 @@ void DataFile::upgrade_1_1_91()
{
QDomElement el = list.item( i ).toElement();
QString s = el.attribute( "src" );
s.replace( QRegExp("/samples/bassloopes/"), "/samples/bassloops/" );
s.replace(QRegularExpression("/samples/bassloopes/"), "/samples/bassloops/");
el.setAttribute( "src", s );
}