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

@@ -26,6 +26,7 @@
#include <utils/fancylineedit.h>
#include <utils/jsontreeitem.h>
#include <utils/macroexpander.h>
#include <utils/mimeconstants.h>
#include <utils/stringutils.h>
#include <utils/utilsicons.h>
#include <utils/variablechooser.h>
@@ -1043,7 +1044,7 @@ TextEditor::BaseTextEditor *jsonEditor()
QTC_ASSERT(textEditor, textEditor = PlainTextEditorFactory::createPlainTextEditor());
TextDocument *document = textEditor->textDocument();
TextEditorWidget *widget = textEditor->editorWidget();
widget->configureGenericHighlighter(Utils::mimeTypeForName("application/json"));
widget->configureGenericHighlighter(mimeTypeForName(Utils::Constants::JSON_MIMETYPE));
widget->setLineNumbersVisible(false);
widget->setRevisionsVisible(false);
widget->setCodeFoldingSupported(false);