forked from qt-creator/qt-creator
CmakeEditor: Enable code folding support
Change-Id: I00b34d09c16890de53de4cf910fa2638af3ed4d5 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Daniel Teske
parent
76efc1ef56
commit
b7f1c93495
@@ -152,11 +152,20 @@ QString CMakeEditor::contextHelpId() const
|
|||||||
|
|
||||||
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent)
|
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent)
|
||||||
: BaseTextEditorWidget(new CMakeDocument(), parent)
|
: BaseTextEditorWidget(new CMakeDocument(), parent)
|
||||||
{}
|
{
|
||||||
|
ctor();
|
||||||
|
}
|
||||||
|
|
||||||
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorWidget *other)
|
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorWidget *other)
|
||||||
: BaseTextEditorWidget(other)
|
: BaseTextEditorWidget(other)
|
||||||
{}
|
{
|
||||||
|
ctor();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMakeEditorWidget::ctor()
|
||||||
|
{
|
||||||
|
setCodeFoldingSupported(true);
|
||||||
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *CMakeEditorWidget::createEditor()
|
TextEditor::BaseTextEditor *CMakeEditorWidget::createEditor()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
CMakeEditorWidget(TextEditor::BaseTextEditorWidget *); // avoid stupidity
|
CMakeEditorWidget(TextEditor::BaseTextEditorWidget *); // avoid stupidity
|
||||||
|
void ctor();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMakeDocument : public TextEditor::BaseTextDocument
|
class CMakeDocument : public TextEditor::BaseTextDocument
|
||||||
|
|||||||
Reference in New Issue
Block a user