summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/plaintexteditorfactory.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-01-22 11:48:22 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-02-09 09:36:36 +0000
commit0dff03e6fe6c87917afa43a815a3205e7a5692de (patch)
tree236792c71807263a902576e2a5430978134a583d /src/plugins/texteditor/plaintexteditorfactory.cpp
parent654aa3a0d778cd27c34d07c87304b900a780bda1 (diff)
downloadqt-creator-0dff03e6fe6c87917afa43a815a3205e7a5692de.tar.gz
TextEditor: Implement BaseHoverHandler::identifyMatch()
The extra selection tooltips are a good default for a hover match. We use that in the basic plaintext editor to show, for example, syntax errors in XML documents, detected during extra compiler runs. Change-Id: Ib7f755c482ebc04148567105e4779324799fb670 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/plugins/texteditor/plaintexteditorfactory.cpp')
-rw-r--r--src/plugins/texteditor/plaintexteditorfactory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp
index 86b129d8b8..4f72897140 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.cpp
+++ b/src/plugins/texteditor/plaintexteditorfactory.cpp
@@ -31,6 +31,7 @@
#include "texteditorconstants.h"
#include "texteditorplugin.h"
#include "texteditorsettings.h"
+#include "basehoverhandler.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/infobar.h>
@@ -60,6 +61,7 @@ PlainTextEditorFactory::PlainTextEditorFactory()
setDisplayName(qApp->translate("OpenWith::Editors", Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
addMimeType(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
addMimeType(QLatin1String("text/css")); // for some reason freedesktop thinks css is text/x-csrc
+ addHoverHandler(new BaseHoverHandler);
setDocumentCreator([]() { return new TextDocument(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID); });
setEditorWidgetCreator([]() { return new PlainTextEditorWidget; });