forked from qt-creator/qt-creator
TextEditor: Re-work comment definition handling
No need for most of the machinery. Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -58,6 +58,7 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
|
||||
setContext(Core::Context(Constants::C_PROFILEEDITOR,
|
||||
TextEditor::Constants::C_TEXTEDITOR));
|
||||
setDuplicateSupported(true);
|
||||
setCommentStyle(Utils::CommentDefinition::HashStyle);
|
||||
}
|
||||
|
||||
Core::IEditor *ProFileEditor::duplicate()
|
||||
@@ -79,26 +80,11 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider()
|
||||
|
||||
ProFileEditorWidget::ProFileEditorWidget(QWidget *parent)
|
||||
: BaseTextEditorWidget(new ProFileDocument(), parent)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
{}
|
||||
|
||||
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorWidget *other)
|
||||
: BaseTextEditorWidget(other)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
void ProFileEditorWidget::ctor()
|
||||
{
|
||||
m_commentDefinition.clearCommentStyles();
|
||||
m_commentDefinition.singleLine = QLatin1Char('#');
|
||||
}
|
||||
|
||||
void ProFileEditorWidget::unCommentSelection()
|
||||
{
|
||||
Utils::unCommentSelection(this, m_commentDefinition);
|
||||
}
|
||||
{}
|
||||
|
||||
static bool isValidFileNameChar(const QChar &c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user