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