fix:mdx dictionary make issue compatibility

This commit is contained in:
YiFang Xiao 2024-07-10 23:59:34 +08:00
parent 029c09633b
commit 323395c755

View file

@ -372,7 +372,7 @@ bool MdictParser::readHeader( QDataStream & in )
// Read metadata // Read metadata
rtl_ = headerAttributes.namedItem( "Left2Right" ).toAttr().value() != "Yes"; rtl_ = headerAttributes.namedItem( "Left2Right" ).toAttr().value() != "Yes";
QString title = headerAttributes.namedItem( "Title" ).toAttr().value(); QString title = headerAttributes.namedItem( "Title" ).toAttr().value();
if ( title.isEmpty() ) { if ( title.isEmpty() || title == "Title (No HTML code allowed)" ) {
// Use filename instead // Use filename instead
QFileInfo fi( filename_ ); QFileInfo fi( filename_ );
title_ = fi.baseName(); title_ = fi.baseName();