fix: mdx title should be respected

This commit is contained in:
Xiao Yi Fang 2024-07-04 14:32:53 +08:00 committed by xiaoyifang
parent 2053511856
commit ca4d59b306

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() || title.length() < 5 || title == "Title (No HTML code allowed)" ) {
if ( title.isEmpty() ) {
// Use filename instead
QFileInfo fi( filename_ );
title_ = fi.baseName();