Merge pull request #1671 from xiaoyifang/fix/mdx-title

fix:mdx dictionary make issue compatibility
This commit is contained in:
xiaoyifang 2024-07-11 00:16:16 +08:00 committed by GitHub
commit ddddb705b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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