Bug 82852 - Highlighting incorrect in resolve dialog
Summary: Highlighting incorrect in resolve dialog
Status: RESOLVED FIXED
Alias: None
Product: cervisia
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Loose
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-04 21:13 UTC by Christian Loose
Modified: 2004-06-04 21:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
bugfix patch (3.80 KB, patch)
2004-06-04 21:16 UTC, Christian Loose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Loose 2004-06-04 21:13:45 UTC
Version:           2.1.3 (using KDE KDE 3.2.3)

The highlighting of the conflict in the resolve dialog is incorrect. The complete source code is always highlighted.
Comment 1 Christian Loose 2004-06-04 21:15:05 UTC
CVS commit by cloose:

Fix the highlighting of the conflict source lines: Now the complete version
 isn't marked as changed in the diff views anymore.


  M +13 -12    resolvedlg.cpp   1.24.2.2
  M +4 -4      resolvedlg.h   1.9.2.2


--- kdesdk/cervisia/resolvedlg.cpp  #1.24.2.1:1.24.2.2
@@ -28,5 +28,4 @@
 #include <kmessagebox.h>

-#include "diffview.h"
 #include "misc.h"
 #include "resolvedlg_p.h"
@@ -250,6 +249,6 @@ bool ResolveDialog::parseFile(const QStr
                 else
                 {
-                    addToMergeAndVersionA(line, lineno1);
-                    addToVersionB(line, lineno2);
+                    addToMergeAndVersionA(line, DiffView::Unchanged,
 lineno1); +                    addToVersionB(line, DiffView::Unchanged,
 lineno2); }
                 break;
@@ -260,5 +259,5 @@ bool ResolveDialog::parseFile(const QStr
                     {
                         advanced1++;
-                        addToMergeAndVersionA(line, lineno1);
+                        addToMergeAndVersionA(line, DiffView::Change,
 lineno1); }
                     else
@@ -268,5 +267,5 @@ bool ResolveDialog::parseFile(const QStr
                             line.truncate(separatorPos);
                             advanced1++;
-                            addToMergeAndVersionA(line, lineno1);
+                            addToMergeAndVersionA(line, DiffView::Change,
 lineno1); }
                         state     = VersionB;
@@ -281,5 +280,5 @@ bool ResolveDialog::parseFile(const QStr
                     {
                         advanced2++;
-                        addToVersionB(line, lineno2);
+                        addToVersionB(line, DiffView::Change, lineno2);
                     }
                     else
@@ -289,5 +288,5 @@ bool ResolveDialog::parseFile(const QStr
                             line.truncate(separatorPos);
                             advanced2++;
-                            addToVersionB(line, lineno2);
+                            addToVersionB(line, DiffView::Change, lineno2);
                         }

@@ -322,9 +321,10 @@ bool ResolveDialog::parseFile(const QStr


-void ResolveDialog::addToMergeAndVersionA(const QString& line, int& lineNo)
+void ResolveDialog::addToMergeAndVersionA(const QString& line,
+                                          DiffView::DiffType type, int&
 lineNo) {
     lineNo++;
-    diff1->addLine(line, DiffView::Change, lineNo);
-    merge->addLine(line, DiffView::Change, lineNo);
+    diff1->addLine(line, type, lineNo);
+    merge->addLine(line, type, lineNo);

     m_contentVersionA      += line;
@@ -333,8 +333,9 @@ void ResolveDialog::addToMergeAndVersion


-void ResolveDialog::addToVersionB(const QString& line, int& lineNo)
+void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType
 type, +                                  int& lineNo)
 {
     lineNo++;
-    diff2->addLine(line, DiffView::Change, lineNo);
+    diff2->addLine(line, type, lineNo);

     m_contentVersionB += line;

--- kdesdk/cervisia/resolvedlg.h  #1.9.2.1:1.9.2.2
@@ -21,8 +21,7 @@

 #include <qptrlist.h>
+#include "diffview.h"


-class DiffView;
-
 class QLabel;
 class QTextCodec;
@@ -64,6 +63,7 @@ private:
     void saveFile(const QString &name);
     QString readFile();
-    void addToMergeAndVersionA(const QString& line, int& lineNo);
-    void addToVersionB(const QString& line, int& lineNo);
+    void addToMergeAndVersionA(const QString& line, DiffView::DiffType type,
+                               int& lineNo);
+    void addToVersionB(const QString& line, DiffView::DiffType type, int&
 lineNo); void updateMergedVersion(ResolveItem* item, ChooseType chosen);

Comment 2 Christian Loose 2004-06-04 21:16:13 UTC
Created attachment 6249 [details]
bugfix patch