2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

mime types hack added for webp

This commit is contained in:
John Preston
2015-01-03 02:44:34 +03:00
parent 9dab1f1fe2
commit 5d54d48f70
5 changed files with 91 additions and 6 deletions

View File

@@ -651,7 +651,7 @@ void DocumentOpenLink::onClick(Qt::MouseButton button) const {
if (data->status != FileReady) return;
QString name = data->name, filter;
QMimeType mimeType = QMimeDatabase().mimeTypeForName(data->mime);
MimeType mimeType = mimeTypeForName(data->mime);
QStringList p = mimeType.globPatterns();
QString pattern = p.isEmpty() ? QString() : p.front();
if (name.isEmpty()) {
@@ -682,7 +682,7 @@ void DocumentSaveLink::doSave(bool forceSavingAs) const {
} else {
QDir alreadyDir(already.isEmpty() ? QDir() : QFileInfo(already).dir());
QString name = already.isEmpty() ? data->name : already, filter;
QMimeType mimeType = QMimeDatabase().mimeTypeForName(data->mime);
MimeType mimeType = mimeTypeForName(data->mime);
QStringList p = mimeType.globPatterns();
QString pattern = p.isEmpty() ? QString() : p.front();
if (name.isEmpty()) {