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

List:       kde-commits
Subject:    [messagelib/Applications/16.08] messagecomposer/src/composer-ng: Fix signature bug
From:       Montel Laurent <montel () kde ! org>
Date:       2016-08-31 20:33:28
Message-ID: E1bfCCO-0001w2-RO () code ! kde ! org
[Download RAW message or body]

Git commit cb948e5e2d6060e494dbd9b725061070cecc1dde by Montel Laurent.
Committed on 31/08/2016 at 20:33.
Pushed by mlaurent into branch 'Applications/16.08'.

Fix signature bug

M  +4    -2    messagecomposer/src/composer-ng/richtextcomposersignatures.cpp

http://commits.kde.org/messagelib/cb948e5e2d6060e494dbd9b725061070cecc1dde

diff --git a/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp \
b/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp index \
                5afd781..311c17a 100644
--- a/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
+++ b/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
@@ -22,6 +22,7 @@
 
 #include <KIdentityManagement/Signature>
 #include <QTextBlock>
+#include "messagecomposer_debug.h"
 using namespace MessageComposer;
 
 class Q_DECL_HIDDEN RichTextComposerSignatures::RichTextComposerSignaturesPrivate
@@ -153,6 +154,7 @@ bool RichTextComposerSignatures::replaceSignature(const \
KIdentityManagement::Sig  if (oldSig == newSig) {
         return false;
     }
+
     QString oldSigText = oldSig.toPlainText();
     if (oldSigText.isEmpty()) {
         return false;
@@ -181,8 +183,8 @@ bool RichTextComposerSignatures::replaceSignature(const \
KIdentityManagement::Sig  if (newSig.rawText().isEmpty() &&
                 text.mid(currentMatch - 4, 4) == QLatin1String("-- \n")) {
             cursor.movePosition(QTextCursor::PreviousCharacter,
-                                QTextCursor::MoveAnchor, 5);
-            additionalMove = 5;
+                                QTextCursor::MoveAnchor, 4);
+            additionalMove = 4;
         }
         cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor,
                             oldSigText.length() + additionalMove);


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

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