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

List:       kde-commits
Subject:    qt-copy/src/kernel
From:       Daniel Molkentin <molkentin () kde ! org>
Date:       2003-06-04 21:35:16
[Download RAW message or body]

CVS commit by danimo: 

binner is right, that makes it even worse -- reverting for now and talking back to qt-bugs


  M +12 -10    qpainter.cpp   1.56


--- qt-copy/src/kernel/qpainter.cpp  #1.55:1.56
@@ -2843,5 +2843,5 @@ void qt_format_text( const QFont& font, 
             ++maxUnderlines;
         }
-        ++chr;
+        chr++;
     }
     if ( !expandtabs ) {
@@ -2850,5 +2850,5 @@ void qt_format_text( const QFont& font, 
             if ( *chr == '\t' )
                 *chr = ' ';
-            ++chr;
+            chr++;
         }
     }
@@ -2862,14 +2862,16 @@ void qt_format_text( const QFont& font, 
         while ( l ) {
             if ( *cin == '&' ) {
-                ++cin;
-                if ( --l )
-                    break;
-                if ( *cin != '&' )
-                    underlinePositions[numUnderlines++] = cout - text.unicode();
+                if ( l > 1 && *(cin+1) != '&' ) {
+                    cin++;
+                    if ( numUnderlines < 31 )
+                        underlinePositions[numUnderlines++] =
+                            cout - text.unicode();
+                    l--;
+                }
             }
             *cout = *cin;
-            ++cout;
-            ++cin;
-            --l;
+            cout++;
+            cin++;
+            l--;
         }
         if ( numUnderlines )


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

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