forked from qt-creator/qt-creator
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:
@@ -75,7 +75,6 @@ JavaEditorFactory::JavaEditorFactory()
|
||||
setUseGenericHighlighter(true);
|
||||
setCommentDefinition(Utils::CommentDefinition::CppStyle);
|
||||
setEditorActionHandlers(TextEditor::TextEditorActionHandler::UnCommentSelection);
|
||||
setMarksVisible(true);
|
||||
setCompletionAssistProvider(new TextEditor::KeywordsCompletionAssistProvider(keywords));
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ public:
|
||||
setAutoCompleterCreator([]() { return new CppAutoCompleter; });
|
||||
setCommentDefinition(CommentDefinition::CppStyle);
|
||||
setCodeFoldingSupported(true);
|
||||
setMarksVisible(true);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
|
||||
setEditorActionHandlers(TextEditorActionHandler::Format
|
||||
|
||||
@@ -132,6 +132,7 @@ public:
|
||||
setEditorWidgetCreator([]() { return new Internal::DesignerXmlEditorWidget; });
|
||||
setUseGenericHighlighter(true);
|
||||
setDuplicatedSupported(false);
|
||||
setMarksVisible(false);
|
||||
}
|
||||
|
||||
FormWindowEditor *create(QDesignerFormWindowInterface *form)
|
||||
|
||||
@@ -325,7 +325,6 @@ GlslEditorFactory::GlslEditorFactory()
|
||||
setCommentDefinition(Utils::CommentDefinition::CppStyle);
|
||||
setCompletionAssistProvider(new GlslCompletionAssistProvider);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(true);
|
||||
setCodeFoldingSupported(true);
|
||||
|
||||
setEditorActionHandlers(TextEditorActionHandler::Format
|
||||
|
||||
@@ -67,9 +67,7 @@ NimEditorFactory::NimEditorFactory()
|
||||
});
|
||||
setCommentDefinition(CommentDefinition::HashStyle);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(false);
|
||||
setCodeFoldingSupported(true);
|
||||
setMarksVisible(true);
|
||||
}
|
||||
|
||||
Core::IEditor *NimEditorFactory::createEditor()
|
||||
|
||||
@@ -57,7 +57,6 @@ PythonEditorFactory::PythonEditorFactory()
|
||||
setSyntaxHighlighterCreator([] { return new PythonHighlighter; });
|
||||
setCommentDefinition(Utils::CommentDefinition::HashStyle);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(true);
|
||||
setCodeFoldingSupported(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1059,7 +1059,6 @@ QmlJSEditorFactory::QmlJSEditorFactory()
|
||||
setAutoCompleterCreator([]() { return new AutoCompleter; });
|
||||
setCommentDefinition(Utils::CommentDefinition::CppStyle);
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(true);
|
||||
setCodeFoldingSupported(true);
|
||||
|
||||
addHoverHandler(new QmlJSHoverHandler);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -80,6 +80,7 @@ VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||
});
|
||||
|
||||
setEditorCreator([]() { return new VcsBaseEditor(); });
|
||||
setMarksVisible(false);
|
||||
}
|
||||
|
||||
VcsBaseEditor *VcsEditorFactory::createEditorById(const char *id)
|
||||
|
||||
Reference in New Issue
Block a user