diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2010-10-11 12:40:09 +0200 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2010-10-11 13:13:52 +0200 |
commit | 8d48b3a03e2a01e68bba06a3a0c66f97cb552cf0 (patch) | |
tree | 855db6f938b1a0637d97fd13caceb31fb718cdf0 /src/plugins/texteditor/plaintexteditor.cpp | |
parent | f58770712d6837542219e26cfe0a55241d691f49 (diff) | |
download | qt-creator-8d48b3a03e2a01e68bba06a3a0c66f97cb552cf0.tar.gz |
Generic highlighter: Don't nag about the missing definition if info bar was once closed.
Reviewed-by: con
Diffstat (limited to 'src/plugins/texteditor/plaintexteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/plaintexteditor.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp index 81b30c9e32..5d169aae71 100644 --- a/src/plugins/texteditor/plaintexteditor.cpp +++ b/src/plugins/texteditor/plaintexteditor.cpp @@ -62,7 +62,8 @@ PlainTextEditorEditable::PlainTextEditorEditable(PlainTextEditor *editor) PlainTextEditor::PlainTextEditor(QWidget *parent) : BaseTextEditor(parent), - m_isMissingSyntaxDefinition(false) + m_isMissingSyntaxDefinition(false), + m_ignoreMissingSyntaxDefinition(false) { setRevisionsVisible(true); setMarksVisible(true); @@ -225,6 +226,11 @@ bool PlainTextEditor::isMissingSyntaxDefinition() const return m_isMissingSyntaxDefinition; } +bool PlainTextEditor::ignoreMissingSyntaxDefinition() const +{ + return m_ignoreMissingSyntaxDefinition; +} + QString PlainTextEditor::findDefinitionId(const Core::MimeType &mimeType, bool considerParents) const { @@ -246,3 +252,14 @@ void PlainTextEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar ty { m_indenter->indentBlock(doc, block, typedChar, tabSettings()); } + +void PlainTextEditor::acceptMissingSyntaxDefinitionInfo() +{ + Core::ICore::instance()->showOptionsDialog(Constants::TEXT_EDITOR_SETTINGS_CATEGORY, + Constants::TEXT_EDITOR_HIGHLIGHTER_SETTINGS); +} + +void PlainTextEditor::ignoreMissingSyntaxDefinitionInfo() +{ + m_ignoreMissingSyntaxDefinition = true; +} |