forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user