Commit 50c2466a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated enum

parent 074d5af9
...@@ -326,7 +326,11 @@ void VocabularyView::slotEditPaste() ...@@ -326,7 +326,11 @@ void VocabularyView::slotEditPaste()
QStringList lines = clipboard->text().split('\n'); QStringList lines = clipboard->text().split('\n');
foreach(QString line, lines) { foreach(QString line, lines) {
// split at tabs or semicolon: // split at tabs or semicolon:
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_model->appendEntry(new KEduVocExpression(line.split(QRegExp(QStringLiteral("[\t;]")), QString::KeepEmptyParts))); m_model->appendEntry(new KEduVocExpression(line.split(QRegExp(QStringLiteral("[\t;]")), QString::KeepEmptyParts)));
#else
m_model->appendEntry(new KEduVocExpression(line.split(QRegExp(QStringLiteral("[\t;]")), Qt::KeepEmptyParts)));
#endif
} }
} }
} }
......
...@@ -75,7 +75,11 @@ void GenderBackendMode::prepareChoices(TestEntry* entry) ...@@ -75,7 +75,11 @@ void GenderBackendMode::prepareChoices(TestEntry* entry)
QString noun = entry->entry()->translation(m_current->languageTo())->text(); QString noun = entry->entry()->translation(m_current->languageTo())->text();
// strip the article // strip the article
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList qsl = noun.split(QRegExp(QStringLiteral("\\s")), QString::SkipEmptyParts); QStringList qsl = noun.split(QRegExp(QStringLiteral("\\s")), QString::SkipEmptyParts);
#else
QStringList qsl = noun.split(QRegExp(QStringLiteral("\\s")), Qt::SkipEmptyParts);
#endif
QMutableStringListIterator qsli(qsl); QMutableStringListIterator qsli(qsl);
while (qsli.hasNext()) while (qsli.hasNext())
if (m_articles.isArticle(qsli.next())) if (m_articles.isArticle(qsli.next()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment