TextEditor: Simplify Utils::CommentDefinition structure

Change-Id: I8fc97ed61c47af2c3d9e5cc2bf81e97661204d4f
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2013-05-25 00:42:44 +02:00
committed by David Schulz
parent dfc0ee6456
commit 4e75fc8c54
7 changed files with 53 additions and 109 deletions

View File

@@ -1178,13 +1178,13 @@ void BaseTextEditorWidget::moveLineUpDown(bool up)
QString trimmedText(text.trimmed());
if (commentDefinition->hasSingleLineStyle()) {
if (trimmedText.startsWith(commentDefinition->singleLine()))
if (trimmedText.startsWith(commentDefinition->singleLine))
shouldReindent = false;
}
if (shouldReindent && commentDefinition->hasMultiLineStyle()) {
// Don't have any single line comments; try multi line.
if (trimmedText.startsWith(commentDefinition->multiLineStart())
&& trimmedText.endsWith(commentDefinition->multiLineEnd())) {
if (trimmedText.startsWith(commentDefinition->multiLineStart)
&& trimmedText.endsWith(commentDefinition->multiLineEnd)) {
shouldReindent = false;
}
}