Don't show code folding margin when it isn't supported

Introduce setCodeFoldingSupported to the BaseTextEditor, and only
enabled it for the C++ and QtScript editors. This removes the useless
margin meant for code folding markers from the plain text editor and
.pro file editor.
This commit is contained in:
Thorbjørn Lindeijer
2009-03-16 17:23:50 +01:00
parent a0631d294b
commit 70d5649428
5 changed files with 25 additions and 3 deletions

View File

@@ -185,6 +185,7 @@ CPPEditor::CPPEditor(QWidget *parent)
{
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
setCodeFoldingVisible(true);
baseTextDocument()->setSyntaxHighlighter(new CppHighlighter);
// new QShortcut(QKeySequence("Ctrl+Alt+M"), this, SLOT(foo()), 0, Qt::WidgetShortcut);