diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-02-05 21:25:31 +0100 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2012-02-05 21:26:33 +0100 |
commit | d065dfd454890c332482a6109ed34a989e50809b (patch) | |
tree | 0d3e9c5367c1fad7d089d368182374e8d1d46ca1 /src/gui/text/qtextdocument_p.cpp | |
parent | 632840cb0f5ad355d87fc040b015d04af86371ec (diff) | |
parent | 9f54846d951838361f4188b423e7aa7c7b9a9540 (diff) |
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Diffstat (limited to 'src/gui/text/qtextdocument_p.cpp')
-rw-r--r-- | src/gui/text/qtextdocument_p.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 9e410b40af..8ce3ae4ac3 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -531,16 +531,17 @@ int QTextDocumentPrivate::remove_block(int pos, int *blockFormat, int command, Q Q_ASSERT(b); if (blocks.size(b) == 1 && command == QTextUndoCommand::BlockAdded) { - Q_ASSERT((int)blocks.position(b) == pos); -// qDebug("removing empty block"); - // empty block remove the block itself + Q_ASSERT((int)blocks.position(b) == pos); + // qDebug("removing empty block"); + // empty block remove the block itself } else { - // non empty block, merge with next one into this block -// qDebug("merging block with next"); - int n = blocks.next(b); - Q_ASSERT((int)blocks.position(n) == pos + 1); - blocks.setSize(b, blocks.size(b) + blocks.size(n) - 1); - b = n; + // non empty block, merge with next one into this block + // qDebug("merging block with next"); + int n = blocks.next(b); + Q_ASSERT((int)blocks.position(n) == pos + 1); + blocks.setSize(b, blocks.size(b) + blocks.size(n) - 1); + blocks.fragment(b)->userState = blocks.fragment(n)->userState; + b = n; } *blockFormat = blocks.fragment(b)->format; |