2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45: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

@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "application.h"
#include "core/file_utilities.h"
#include "core/mime_type.h"
#include "ui/widgets/popup_menu.h"
#include "ui/widgets/buttons.h"
#include "ui/text_options.h"
@@ -807,7 +808,7 @@ void MediaView::onSaveAs() {
QFileInfo alreadyInfo(location.name());
QDir alreadyDir(alreadyInfo.dir());
QString name = alreadyInfo.fileName(), filter;
MimeType mimeType = mimeTypeForName(_doc->mimeString());
const auto mimeType = Core::MimeTypeForName(_doc->mimeString());
QStringList p = mimeType.globPatterns();
QString pattern = p.isEmpty() ? QString() : p.front();
if (name.isEmpty()) {