summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-26 20:13:05 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-26 20:13:05 +0100
commit241d478ce963f6735248d7f4ed3cf11b8d0f7585 (patch)
treefc23ccbc9d954f5891146aa15ac2cd09f4294754
parent1ad4faa33403dc24ddc6f907f2b56bbe968d77f2 (diff)
downloadrockbox-241d478ce9.tar.gz
rockbox-241d478ce9.zip
rbutil: Replace QRegExp with QRegularExpression.
More updating for Qt6 compatibility. Change-Id: I2f5bb943acc1f6bdd7bdab0e90e3c0ede596f43a
-rw-r--r--utils/rbutilqt/base/talkfile.cpp12
-rw-r--r--utils/rbutilqt/base/talkgenerator.cpp1
2 files changed, 8 insertions, 5 deletions
diff --git a/utils/rbutilqt/base/talkfile.cpp b/utils/rbutilqt/base/talkfile.cpp
index 4c9cae5a16..c9876a81f9 100644
--- a/utils/rbutilqt/base/talkfile.cpp
+++ b/utils/rbutilqt/base/talkfile.cpp
@@ -169,16 +169,20 @@ bool TalkFileCreator::createTalkList(QDir startDir)
else // its a File
{
// insert into List
- if( !fileInf.fileName().isEmpty() && !fileInf.fileName().endsWith(".talk") && m_talkFiles)
+ if(!fileInf.fileName().isEmpty()
+ && !fileInf.fileName().endsWith(".talk")
+ && m_talkFiles)
{
//test if we should ignore this file
bool match = false;
for(int i=0; i < m_ignoreFiles.size();i++)
{
- QRegExp rx(m_ignoreFiles[i].trimmed());
- rx.setPatternSyntax(QRegExp::Wildcard);
- if(rx.exactMatch(fileInf.fileName()))
+ QRegularExpression rx(
+ QRegularExpression::wildcardToRegularExpression(
+ (m_ignoreFiles[i].trimmed())));
+ if(rx.match(fileInf.fileName()).hasMatch())
match = true;
+
}
if(match)
continue;
diff --git a/utils/rbutilqt/base/talkgenerator.cpp b/utils/rbutilqt/base/talkgenerator.cpp
index 6798d53829..eb000bf188 100644
--- a/utils/rbutilqt/base/talkgenerator.cpp
+++ b/utils/rbutilqt/base/talkgenerator.cpp
@@ -275,7 +275,6 @@ QString TalkGenerator::correctString(QString s)
LOG_INFO() << "corrected string" << s << "to" << corrected;
return corrected;
- m_abort = true;
}
void TalkGenerator::setLang(QString name)