Commit 46810aac authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

SkipEmptyParts is part of Qt::.

parent 8975676b
......@@ -102,9 +102,17 @@ void KanjiBrowser::loadKanji()
// manage that information in KanjiBrowserView.
int grade = 0;
int strokes = 0;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList gradeSection = line.split( ' ', QString::SkipEmptyParts )
#else
QStringList gradeSection = line.split( ' ', Qt::SkipEmptyParts )
#endif
.filter( gradeMatch );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList strokesSection = line.split( ' ', QString::SkipEmptyParts )
#else
QStringList strokesSection = line.split( ' ', Qt::SkipEmptyParts )
#endif
.filter( strokeMatch );
// There are some kanji without grade (example: those not in Jouyou list).
......
......@@ -285,7 +285,11 @@ bool EntryEdict::loadEntry( const QString &entryLine )
QString remainingLine = entryLine.mid( endOfKanjiAndKanaSection );
//Trim to last '/'
remainingLine = remainingLine.left( remainingLine.lastIndexOf( '/' ) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
Meanings = remainingLine.split( '/', QString::SkipEmptyParts );
#else
Meanings = remainingLine.split( '/', Qt::SkipEmptyParts );
#endif
if( Meanings.size() == 0 )
{
......
......@@ -92,7 +92,11 @@ bool RadicalFile::loadRadicalFile( QString &radkfile )
else if( newestRadical != nullptr )
{
// List of m_kanji, potentially
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QList<QString> m_kanjiList = line.trimmed().split( QLatin1String(""), QString::SkipEmptyParts );
#else
QList<QString> m_kanjiList = line.trimmed().split( QLatin1String(""), Qt::SkipEmptyParts );
#endif
newestRadical->addKanji( m_kanjiList.toSet() );
foreach( const QString &kanji, m_kanjiList )
{
......
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