forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user