From 8623a93998a3f1b37c4fcaa10c282cb71eb4f0a3 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 11 Jun 2018 14:07:20 +0200 Subject: [PATCH] Fix that bookmarks couldn't be added to .pro files with mouse The area with the marks was not showing up. This patch reverses the logic for showing the marks area to opt-out. Almost all editors were opting in for it already. The AndroidManifest editor, VCS base editor, and widget designer text editor opt out now. Task-number: QTCREATORBUG-20339 Change-Id: Iccb6d0256618f7ef70e8921847ce2fd46fd660c0 Reviewed-by: David Schulz --- src/plugins/android/javaeditor.cpp | 1 - src/plugins/cppeditor/cppeditorplugin.cpp | 1 - src/plugins/designer/formeditorw.cpp | 1 + src/plugins/glsleditor/glsleditor.cpp | 1 - src/plugins/nim/editor/nimeditorfactory.cpp | 2 -- src/plugins/pythoneditor/pythoneditor.cpp | 1 - src/plugins/qmljseditor/qmljseditor.cpp | 1 - src/plugins/texteditor/texteditor.cpp | 3 +-- src/plugins/vcsbase/basevcseditorfactory.cpp | 1 + 9 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp index 81c3112219f..8b023b17032 100644 --- a/src/plugins/android/javaeditor.cpp +++ b/src/plugins/android/javaeditor.cpp @@ -75,7 +75,6 @@ JavaEditorFactory::JavaEditorFactory() setUseGenericHighlighter(true); setCommentDefinition(Utils::CommentDefinition::CppStyle); setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection); - setMarksVisible(true); setCompletionAssistProvider(new TextEditor::KeywordsCompletionAssistProvider(keywords)); } diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 0f88851d2fc..5f2e9a703df 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -99,7 +99,6 @@ public: setAutoCompleterCreator([]() { return new CppAutoCompleter; }); setCommentDefinition(CommentDefinition::CppStyle); setCodeFoldingSupported(true); - setMarksVisible(true); setParenthesesMatchingEnabled(true); setEditorActionHandlers(TextEditorActionHandler::Format diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 35dc799cf57..b3e64ec2b09 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -132,6 +132,7 @@ public: setEditorWidgetCreator([]() { return new Internal::DesignerXmlEditorWidget; }); setUseGenericHighlighter(true); setDuplicatedSupported(false); + setMarksVisible(false); } FormWindowEditor *create(QDesignerFormWindowInterface *form) diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index 928deda44f1..108ef838793 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -325,7 +325,6 @@ GlslEditorFactory::GlslEditorFactory() setCommentDefinition(Utils::CommentDefinition::CppStyle); setCompletionAssistProvider(new GlslCompletionAssistProvider); setParenthesesMatchingEnabled(true); - setMarksVisible(true); setCodeFoldingSupported(true); setEditorActionHandlers(TextEditorActionHandler::Format diff --git a/src/plugins/nim/editor/nimeditorfactory.cpp b/src/plugins/nim/editor/nimeditorfactory.cpp index 18b6a29eaee..4a2cb4d59b7 100644 --- a/src/plugins/nim/editor/nimeditorfactory.cpp +++ b/src/plugins/nim/editor/nimeditorfactory.cpp @@ -67,9 +67,7 @@ NimEditorFactory::NimEditorFactory() }); setCommentDefinition(CommentDefinition::HashStyle); setParenthesesMatchingEnabled(true); - setMarksVisible(false); setCodeFoldingSupported(true); - setMarksVisible(true); } Core::IEditor *NimEditorFactory::createEditor() diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp index 8ae6efde823..c3a608e8d36 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/pythoneditor/pythoneditor.cpp @@ -57,7 +57,6 @@ PythonEditorFactory::PythonEditorFactory() setSyntaxHighlighterCreator([] { return new PythonHighlighter; }); setCommentDefinition(Utils::CommentDefinition::HashStyle); setParenthesesMatchingEnabled(true); - setMarksVisible(true); setCodeFoldingSupported(true); } diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 1cc059c0467..a9e063245eb 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -1059,7 +1059,6 @@ QmlJSEditorFactory::QmlJSEditorFactory() setAutoCompleterCreator([]() { return new AutoCompleter; }); setCommentDefinition(Utils::CommentDefinition::CppStyle); setParenthesesMatchingEnabled(true); - setMarksVisible(true); setCodeFoldingSupported(true); addHoverHandler(new QmlJSHoverHandler); diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 9ef886f2972..a915b656f6e 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8477,7 +8477,6 @@ bool TextEditorWidget::isMissingSyntaxDefinition() const // The remnants of PlainTextEditor. void TextEditorWidget::setupGenericHighlighter() { - setMarksVisible(true); setLineSeparatorsAllowed(true); connect(textDocument(), &IDocument::filePathChanged, @@ -8574,7 +8573,7 @@ public: bool m_duplicatedSupported = true; bool m_codeFoldingSupported = false; bool m_paranthesesMatchinEnabled = false; - bool m_marksVisible = false; + bool m_marksVisible = true; }; } /// namespace Internal diff --git a/src/plugins/vcsbase/basevcseditorfactory.cpp b/src/plugins/vcsbase/basevcseditorfactory.cpp index 4c4083a431e..5ba38b58eb6 100644 --- a/src/plugins/vcsbase/basevcseditorfactory.cpp +++ b/src/plugins/vcsbase/basevcseditorfactory.cpp @@ -80,6 +80,7 @@ VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters, }); setEditorCreator([]() { return new VcsBaseEditor(); }); + setMarksVisible(false); } VcsBaseEditor *VcsEditorFactory::createEditorById(const char *id)