2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move MimeType from utils to core/mime_type.

Also move to Core namespace.
This commit is contained in:
John Preston
2018-06-14 01:06:21 +03:00
parent 2b36dd660b
commit 0e9793b845
11 changed files with 153 additions and 112 deletions

View File

@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "inline_bots/inline_bot_send_data.h"
#include "storage/file_download.h"
#include "core/file_utilities.h"
#include "core/mime_type.h"
#include "mainwidget.h"
#include "auth_session.h"
@@ -427,7 +428,7 @@ MTPVector<MTPDocumentAttribute> Result::adjustAttributes(
const auto &fields = audio->c_documentAttributeAudio();
if (!exists(mtpc_documentAttributeFilename)
&& !(fields.vflags.v & Flag::f_voice)) {
const auto p = mimeTypeForName(mime).globPatterns();
const auto p = Core::MimeTypeForName(mime).globPatterns();
auto pattern = p.isEmpty() ? QString() : p.front();
const auto extension = pattern.isEmpty()
? qsl(".unknown")