Utils: Proliferate use of <utils/mimeconstants.h>

This deduplicates several mime type strings.

Change-Id: Ib1746387e233ca5b7134e65859b5ec1c7832b8e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2023-12-15 23:54:03 +01:00
parent 1c0ce68410
commit fc3291afed
18 changed files with 48 additions and 42 deletions

View File

@@ -27,6 +27,7 @@
#include <utils/appinfo.h>
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <utils/mimeconstants.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
@@ -492,7 +493,7 @@ LocalHelpManager::HelpData LocalHelpManager::helpData(const QUrl &url)
data.data = engine.fileData(data.resolvedUrl);
data.mimeType = HelpViewer::mimeFromUrl(data.resolvedUrl);
if (data.mimeType.isEmpty())
data.mimeType = "application/octet-stream";
data.mimeType = Utils::Constants::OCTET_STREAM_MIMETYPE;
} else {
data.data = loadErrorMessage(url, Tr::tr("The page could not be found"));
data.mimeType = "text/html";