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

@@ -68,6 +68,7 @@ struct StorageSettings;
struct Parenthesis;
typedef QVector<Parenthesis> Parentheses;
struct TEXTEDITOR_EXPORT Parenthesis
{
enum Type { Opened, Closed };
@@ -84,7 +85,6 @@ struct TEXTEDITOR_EXPORT Parenthesis
};
class TEXTEDITOR_EXPORT TextBlockUserData : public QTextBlockUserData
{
public:
@@ -285,6 +285,9 @@ public:
void setCodeFoldingVisible(bool b);
bool codeFoldingVisible() const;
void setCodeFoldingSupported(bool b);
bool codeFoldingSupported() const;
void setRevisionsVisible(bool b);
bool revisionsVisible() const;