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 <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2018-06-11 14:07:20 +02:00
parent 1458ea5806
commit 8623a93998
9 changed files with 3 additions and 9 deletions

View File

@@ -75,7 +75,6 @@ JavaEditorFactory::JavaEditorFactory()
setUseGenericHighlighter(true);
setCommentDefinition(Utils::CommentDefinition::CppStyle);
setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection);
setMarksVisible(true);
setCompletionAssistProvider(new TextEditor::KeywordsCompletionAssistProvider(keywords));
}

View File

@@ -99,7 +99,6 @@ public:
setAutoCompleterCreator([]() { return new CppAutoCompleter; });
setCommentDefinition(CommentDefinition::CppStyle);
setCodeFoldingSupported(true);
setMarksVisible(true);
setParenthesesMatchingEnabled(true);
setEditorActionHandlers(TextEditorActionHandler::Format

View File

@@ -132,6 +132,7 @@ public:
setEditorWidgetCreator([]() { return new Internal::DesignerXmlEditorWidget; });
setUseGenericHighlighter(true);
setDuplicatedSupported(false);
setMarksVisible(false);
}
FormWindowEditor *create(QDesignerFormWindowInterface *form)

View File

@@ -325,7 +325,6 @@ GlslEditorFactory::GlslEditorFactory()
setCommentDefinition(Utils::CommentDefinition::CppStyle);
setCompletionAssistProvider(new GlslCompletionAssistProvider);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
setEditorActionHandlers(TextEditorActionHandler::Format

View File

@@ -67,9 +67,7 @@ NimEditorFactory::NimEditorFactory()
});
setCommentDefinition(CommentDefinition::HashStyle);
setParenthesesMatchingEnabled(true);
setMarksVisible(false);
setCodeFoldingSupported(true);
setMarksVisible(true);
}
Core::IEditor *NimEditorFactory::createEditor()

View File

@@ -57,7 +57,6 @@ PythonEditorFactory::PythonEditorFactory()
setSyntaxHighlighterCreator([] { return new PythonHighlighter; });
setCommentDefinition(Utils::CommentDefinition::HashStyle);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
}

View File

@@ -1059,7 +1059,6 @@ QmlJSEditorFactory::QmlJSEditorFactory()
setAutoCompleterCreator([]() { return new AutoCompleter; });
setCommentDefinition(Utils::CommentDefinition::CppStyle);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
addHoverHandler(new QmlJSHoverHandler);

View File

@@ -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

View File

@@ -80,6 +80,7 @@ VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
});
setEditorCreator([]() { return new VcsBaseEditor(); });
setMarksVisible(false);
}
VcsBaseEditor *VcsEditorFactory::createEditorById(const char *id)