mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-09 11:50:16 +00:00
GUI: attachment editor: fix adding new attachments
The content wasn't read at all.
This commit is contained in:
parent
e6c91bb480
commit
e61037d412
@ -637,7 +637,6 @@ Tab::removeSelectedAttachment() {
|
||||
|
||||
KaxAttachedPtr
|
||||
Tab::createAttachmentFromFile(QString const &fileName) {
|
||||
QByteArray content;
|
||||
QFile file{fileName};
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
@ -645,6 +644,7 @@ Tab::createAttachmentFromFile(QString const &fileName) {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto content = file.readAll();
|
||||
auto mimeType = guess_mime_type(to_utf8(fileName), true);
|
||||
auto contentAsMem = std::make_shared<memory_c>(content.data(), content.count(), false);
|
||||
auto uid = create_unique_number(UNIQUE_ATTACHMENT_IDS);
|
||||
|
Loading…
Reference in New Issue
Block a user