[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/calligra/2.6] libs/kotext/commands: Fix compilation errors due while cherry picking to 2.6
From:       Gopalakrishna Bhat A <gopalakbhat () gmail ! com>
Date:       2013-01-26 3:27:00
Message-ID: 20130126032700.022B6A60E0 () git ! kde ! org
[Download RAW message or body]

Git commit c90285ae6ac326e4b914b5fb1b640707010c5916 by Gopalakrishna Bhat A.
Committed on 26/01/2013 at 04:23.
Pushed by gopalakrishnabhat into branch 'calligra/2.6'.

Fix compilation errors due while cherry picking to 2.6

M  +6    -6    libs/kotext/commands/ParagraphFormattingCommand.cpp

http://commits.kde.org/calligra/c90285ae6ac326e4b914b5fb1b640707010c5916

diff --git a/libs/kotext/commands/ParagraphFormattingCommand.cpp \
b/libs/kotext/commands/ParagraphFormattingCommand.cpp index 81c6406..c78875b 100644
--- a/libs/kotext/commands/ParagraphFormattingCommand.cpp
+++ b/libs/kotext/commands/ParagraphFormattingCommand.cpp
@@ -107,19 +107,19 @@ void ParagraphFormattingCommand::redo()
     if (!m_first) {
         KUndo2Command::redo();
     } else {        
-        int caretAnchor = m_editor->cursor().anchor();
-        int caretPosition = m_editor->cursor().position();
+        int caretAnchor = m_editor->cursor()->anchor();
+        int caretPosition = m_editor->cursor()->position();
 
         MergeAutoParagraphStyleVisitor visitor(m_editor, m_charFormat, \
m_blockFormat);  
         m_editor->recursivelyVisitSelection(m_editor->document()->rootFrame()->begin(), \
visitor);  
-        if (!isEditProtected() && caretAnchor == caretPosition) { //if there is no \
selection, it can happen that the caret does not get the proper style applied \
                (begining of a block). We need to force it.
-            d->caret.mergeCharFormat(deltaCharFormat);
+        if (!m_editor->isEditProtected() && caretAnchor == caretPosition) { //if \
there is no selection, it can happen that the caret does not get the proper style \
applied (begining of a block). We need to force it. +            \
m_editor->cursor()->mergeCharFormat(m_charFormat);  }
         else {
-            m_editor->cursor().setPosition(caretAnchor);
-            m_editor->cursor().setPosition(caretPosition, QTextCursor::KeepAnchor);
+            m_editor->cursor()->setPosition(caretAnchor);
+            m_editor->cursor()->setPosition(caretPosition, QTextCursor::KeepAnchor);
         }
 
         KoTextEditor::ChangeListFlags flags(KoTextEditor::AutoListStyle | \
KoTextEditor::DontUnsetIfSame);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic