diff --git a/src/handlers/xdgurl.cpp b/src/handlers/xdgurl.cpp index a55536597a04628e5e2cdd8ab006c47404eb0887..16b389ca068e76bcf1263a97d664b310b2546cc3 100644 --- a/src/handlers/xdgurl.cpp +++ b/src/handlers/xdgurl.cpp @@ -1,7 +1,6 @@ #include <QUrl> #include <QUrlQuery> #include <QTemporaryFile> -#include <QMimeDatabase> #include <QNetworkReply> #include <QDesktopServices> @@ -108,16 +107,6 @@ void XdgUrl::_saveDownloadedFile(QNetworkReply *reply) return; } - QMimeDatabase mimeDb; - QString mimeType = mimeDb.mimeTypeForFile(temporaryFile.fileName()).name(); - - if (mimeType == "text/html" || mimeType == "application/xhtml+xml") { - result["status"] = QString("error_filetype"); - result["message"] = QString("The file is unsupported file type " + mimeType); - emit error(Utility::Json::convertObjToStr(result)); - return; - } - QString type = _metadata["type"].toString(); QString destination = _destinations[type].toString(); QString path = destination + "/" + _metadata["filename"].toString(); @@ -152,16 +141,6 @@ void XdgUrl::_installDownloadedFile(QNetworkReply *reply) return; } - QMimeDatabase mimeDb; - QString mimeType = mimeDb.mimeTypeForFile(temporaryFile.fileName()).name(); - - if (mimeType == "text/html" || mimeType == "application/xhtml+xml") { - result["status"] = QString("error_filetype"); - result["message"] = QString("The file is unsupported file type " + mimeType); - emit error(Utility::Json::convertObjToStr(result)); - return; - } - QString type = _metadata["type"].toString(); QString destination = _destinations[type].toString(); QString path = destination + "/" + _metadata["filename"].toString(); diff --git a/src/qml/main.qml b/src/qml/main.qml index f2b6cfa99d409cd14f38f99eab064ff89429f6fe..674523a172ed90ab800598e5f542c3b748ef6415 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -104,7 +104,6 @@ Window { 'success_install': 'Installation successfull', 'error_validation': 'Validation error', 'error_network': 'Network error', - 'error_filetype': 'File type error', 'error_save': 'Saving file failed', 'error_install': 'Installation failed' };