Skip to content

Commit fa0e1b7

Browse files
refactor: drop QRegularExpression conditional compile
since Qt 5.15 needed
1 parent 6914345 commit fa0e1b7

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

makespec/BUILDVERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
127
1+
128

src/addtestcaseswizard.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ auto AddTestCasesWizard::getMatchedPart(const QString &str, const QString &patte
172172
QString regExp = ui->argumentList->item(index, 1)->text();
173173

174174
for (int j = i; j < str.length(); j++) {
175-
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
176175
regExp = QRegularExpression::anchoredPattern(regExp);
177176
if (QRegularExpression(regExp).match(str.mid(i, j - i + 1)).hasMatch()) {
178177
if (QRegularExpression(
@@ -184,15 +183,6 @@ auto AddTestCasesWizard::getMatchedPart(const QString &str, const QString &patte
184183
break;
185184
}
186185
}
187-
#else
188-
if (QRegExp(regExp).exactMatch(str.mid(i, j - i + 1))) {
189-
if (QRegExp(getFullRegExp(pattern.mid(pos + 3))).exactMatch(str.mid(j + 1))) {
190-
result[index] = str.mid(i, j - i + 1);
191-
i = j;
192-
break;
193-
}
194-
}
195-
#endif
196186
}
197187
pos += 2;
198188
}
@@ -210,11 +200,7 @@ void AddTestCasesWizard::searchMatchedFiles() {
210200
QString regExp = getFullRegExp(inputFilesPattern);
211201

212202
for (int i = 0; i < inputFiles.size(); i++) {
213-
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
214203
if (! QRegularExpression(QRegularExpression::anchoredPattern(regExp)).match(inputFiles[i]).hasMatch())
215-
#else
216-
if (! QRegExp(regExp).exactMatch(inputFiles[i]))
217-
#endif
218204
{
219205
inputFiles.removeAt(i);
220206
i--;
@@ -224,13 +210,9 @@ void AddTestCasesWizard::searchMatchedFiles() {
224210
regExp = getFullRegExp(outputFilesPattern);
225211

226212
for (int i = 0; i < outputFiles.size(); i++) {
227-
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
228213
if (! QRegularExpression(QRegularExpression::anchoredPattern(regExp))
229214
.match(outputFiles[i])
230215
.hasMatch())
231-
#else
232-
if (! QRegExp(regExp).exactMatch(outputFiles[i]))
233-
#endif
234216
{
235217
outputFiles.removeAt(i);
236218
i--;

0 commit comments

Comments
 (0)