GUI: headers: show attachments with empty name as <unnamed>

This was the intention all along, and it already worked when the name
attribute wasn't present at all.

Part of the fix of #2642.
This commit is contained in:
Moritz Bunkus 2019-10-27 12:35:16 +01:00
parent 7d69bbdad7
commit fdf1c8af20
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,8 @@
#2632.
* mkvmerge: attachments without a file name won't be ignored anymore. Part of
the fix of #2642.
* MKVToolNix GUI: header editor: attachments with an empty name element will
be shown as `<unnamed>` as originally intended. Part of the fix of #2642.
## Build system changes

View File

@ -98,7 +98,8 @@ AttachedFilePage::dropEvent(QDropEvent *event) {
QString
AttachedFilePage::title()
const {
return Q(FindChildValue<KaxFileName>(*m_attachment, to_wide(Y("<Unnamed>"))));
auto name = Q(FindChildValue<KaxFileName>(*m_attachment));
return !name.isEmpty() ? name : QY("<Unnamed>");
}
void