rbutil: Replace QRegExp with QRegularExpression.
More updating for Qt6 compatibility. Change-Id: I2f5bb943acc1f6bdd7bdab0e90e3c0ede596f43a
This commit is contained in:
parent
1ad4faa334
commit
241d478ce9
2 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue