summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/plaintexteditor.cpp
diff options
context:
space:
mode:
authorjkobus <jaroslaw.kobus@digia.com>2013-08-13 12:57:31 +0200
committerJarek Kobus <jaroslaw.kobus@digia.com>2013-08-26 13:39:40 +0200
commite8801167aa7a0047c9c9be0942ed0b368e5b5aa4 (patch)
treeeb1dcf7998b0457518681126ddf9b49f198dd2d4 /src/plugins/texteditor/plaintexteditor.cpp
parent760aa0f8bce34e094abecdd99c77c359fb96bb67 (diff)
downloadqt-creator-e8801167aa7a0047c9c9be0942ed0b368e5b5aa4.tar.gz
Add common interface for text formats inside syntax highlighter
Change-Id: I87f64446161a57aea0896f68e4eafacef791969b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/texteditor/plaintexteditor.cpp')
-rw-r--r--src/plugins/texteditor/plaintexteditor.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp
index 8bd4d46239..61103b7bbf 100644
--- a/src/plugins/texteditor/plaintexteditor.cpp
+++ b/src/plugins/texteditor/plaintexteditor.cpp
@@ -38,15 +38,12 @@
#include "manager.h"
#include "context.h"
#include "normalindenter.h"
-#include "fontsettings.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <QSharedPointer>
-#include <QDebug>
-
using namespace Core;
using namespace TextEditor::Internal;
@@ -94,30 +91,6 @@ void PlainTextEditorWidget::unCommentSelection()
Utils::unCommentSelection(this, m_commentDefinition);
}
-void PlainTextEditorWidget::setFontSettings(const FontSettings &fs)
-{
- BaseTextEditorWidget::setFontSettings(fs);
-
- if (baseTextDocument()->syntaxHighlighter()) {
- Highlighter *highlighter =
- static_cast<Highlighter *>(baseTextDocument()->syntaxHighlighter());
-
- highlighter->configureFormat(Highlighter::VisualWhitespace, fs.toTextCharFormat(C_VISUAL_WHITESPACE));
- highlighter->configureFormat(Highlighter::Keyword, fs.toTextCharFormat(C_KEYWORD));
- highlighter->configureFormat(Highlighter::DataType, fs.toTextCharFormat(C_TYPE));
- highlighter->configureFormat(Highlighter::Comment, fs.toTextCharFormat(C_COMMENT));
- // Using C_NUMBER for all kinds of numbers.
- highlighter->configureFormat(Highlighter::Decimal, fs.toTextCharFormat(C_NUMBER));
- highlighter->configureFormat(Highlighter::BaseN, fs.toTextCharFormat(C_NUMBER));
- highlighter->configureFormat(Highlighter::Float, fs.toTextCharFormat(C_NUMBER));
- // Using C_STRING for strings and chars.
- highlighter->configureFormat(Highlighter::Char, fs.toTextCharFormat(C_STRING));
- highlighter->configureFormat(Highlighter::String, fs.toTextCharFormat(C_STRING));
-
- highlighter->rehighlight();
- }
-}
-
void PlainTextEditorWidget::setTabSettings(const TextEditor::TabSettings &ts)
{
BaseTextEditorWidget::setTabSettings(ts);