Commit 6856008e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15. SkipEmptyParts is part of Qt::.

parent feda79ff
...@@ -153,7 +153,11 @@ void KWQCommandPaste::redo() ...@@ -153,7 +153,11 @@ void KWQCommandPaste::redo()
QString s = QApplication::clipboard()->text(); QString s = QApplication::clipboard()->text();
QStringList sl; QStringList sl;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
sl = s.split('\n', QString::SkipEmptyParts); sl = s.split('\n', QString::SkipEmptyParts);
#else
sl = s.split('\n', Qt::SkipEmptyParts);
#endif
if (sl.isEmpty()) if (sl.isEmpty())
return; return;
QStringList sr; QStringList sr;
......
...@@ -161,12 +161,20 @@ bool KWQQuizModel::checkAnswer(const QString & a) ...@@ -161,12 +161,20 @@ bool KWQQuizModel::checkAnswer(const QString & a)
if (!m_correctBlank.isEmpty()) { if (!m_correctBlank.isEmpty()) {
QStringList la, ls; QStringList la, ls;
if (ans.indexOf(';') > 0) if (ans.indexOf(';') > 0)
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
ls = ans.split(';', QString::SkipEmptyParts); ls = ans.split(';', QString::SkipEmptyParts);
#else
ls = ans.split(';', Qt::SkipEmptyParts);
#endif
else else
ls.append(ans); ls.append(ans);
if (m_correctBlank.indexOf(';') > 0) if (m_correctBlank.indexOf(';') > 0)
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
la = m_correctBlank.split(';', QString::SkipEmptyParts); la = m_correctBlank.split(';', QString::SkipEmptyParts);
#else
la = m_correctBlank.split(';', Qt::SkipEmptyParts);
#endif
else else
la.append(m_correctBlank); la.append(m_correctBlank);
......
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