SOURCES: kdelibs-branch.diff - updated
arekm
arekm at pld-linux.org
Tue Aug 8 08:04:58 CEST 2006
Author: arekm Date: Tue Aug 8 06:04:58 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated
---- Files affected:
SOURCES:
kdelibs-branch.diff (1.27 -> 1.28)
---- Diffs:
================================================================
Index: SOURCES/kdelibs-branch.diff
diff -u SOURCES/kdelibs-branch.diff:1.27 SOURCES/kdelibs-branch.diff:1.28
--- SOURCES/kdelibs-branch.diff:1.27 Sat Jul 1 12:04:16 2006
+++ SOURCES/kdelibs-branch.diff Tue Aug 8 08:04:53 2006
@@ -1,15372 +1,1223 @@
Index: interfaces/kscript/sample/shellscript.desktop
===================================================================
---- interfaces/kscript/sample/shellscript.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ interfaces/kscript/sample/shellscript.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -62,6 +62,7 @@
- Name[vi]=Báť chấy táşp láťnh háť váť Bash
- Name[wa]=Enondeu di scripes shell bash
- Name[zh_CN]=Bash Shell čćŹčżčĄç¨ĺş
-+Name[zh_TW]=Bash Shell Script ĺˇčĄĺ¨
- Type=Service
- X-KDE-Library=libshellscript
- X-KDE-Script-Runner=ShellScript/bash
-Index: interfaces/kimproxy/interface/dcopinstantmessenger.desktop
-===================================================================
---- interfaces/kimproxy/interface/dcopinstantmessenger.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ interfaces/kimproxy/interface/dcopinstantmessenger.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -60,3 +60,4 @@
- Comment[vi]=Báť tin nhắn tᝊc khắc cĂł giao diáťn DCOP
- Comment[zh_CN]=希 DCOP ćĽĺŁçĺłćśé莯ç¨ĺş
- Comment[zh_HK]=éć DCOP äťé˘çĺłćéč¨čťäťś
-+Comment[zh_TW]=DCOP äťé˘çĺłćéč¨çłťçľą
-Index: interfaces/kimproxy/interface/kcm_instantmessenger.desktop
-===================================================================
---- interfaces/kimproxy/interface/kcm_instantmessenger.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ interfaces/kimproxy/interface/kcm_instantmessenger.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -48,6 +48,7 @@
- Name[vi]=Bᝠtin nhắn tᝊc khắc
- Name[zh_CN]=ĺłćśé莯ç¨ĺş
- Name[zh_HK]=ĺłćéč¨čťäťś
-+Name[zh_TW]=ĺłćéč¨
- Comment=The instant messenger allows two-way chat between individuals and groups.
- Comment[af]=Die oombliklike boodskappe laat twee rigting kommunikasie tussen individue en groepe toe.
- Comment[bg]=Đ Đ°ĐˇĐłĐžĐ˛ĐžŃ ĐźĐľĐśĐ´Ń ŃаСНиŃни Ń
ĐžŃа в ŃоаНнО вŃоПо.
-@@ -105,6 +106,7 @@
- Comment[vi]=Báť tin nhắn tᝊc khắc cho phĂŠp trò chuyáťn hai chiáťu giᝯa ngưáťi riĂŞng vĂ nhĂłm.
- Comment[zh_CN]=ĺ
莸ĺ¨ä¸Şäşşĺ瞤çťäšé´ĺĺč夊çĺłćśé莯ç¨ĺşă
- Comment[zh_HK]=ĺłćéč¨čťäťśĺŻäťĽčŽç¨ćśĺĺĽçç¨ćść瞣çľéč¨ă
-+Comment[zh_TW]=ĺłćéč¨çłťçľąĺ
訹ĺ
Šĺäşşćĺ
Šĺ瞤çľéçč夊čĺ°čŠą
- ServiceTypeToConfigure=DCOP/InstantMessenger
- MimeTypeOfInterest=DCOP/InstantMessenger
- defaultImplementation=kopete
-Index: interfaces/kspeech/dcoptexttospeech.desktop
-===================================================================
---- interfaces/kspeech/dcoptexttospeech.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ interfaces/kspeech/dcoptexttospeech.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -57,3 +57,4 @@
- Comment[vi]=Dáťch v᝼ VÄn bản sang Tiáşżng nĂłi cĂł giao diáťn DCOP
- Comment[zh_CN]=希 DCOP ćĽĺŁçććŹĺ°čŻéłćĺĄ
- Comment[zh_HK]=éć DCOP äťé˘çćĺćčŽĺˇĽĺ
ˇ
-+Comment[zh_TW]=DCOP äťé˘çćĺč˝čŞéłćĺ
-Index: kate/plugins/kdatatool/ktexteditor_kdatatool.desktop
-===================================================================
---- kate/plugins/kdatatool/ktexteditor_kdatatool.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/plugins/kdatatool/ktexteditor_kdatatool.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -102,7 +102,7 @@
- Comment[hu]=AdatkezelĂŠsi eszkĂśzĂśk (pl. szinonimaszĂłtĂĄr, helyesĂrĂĄs-ellenĹrzĹ) tĂĄmogatĂĄsa
- Comment[is]=Virkir gagnatól eins og stafsetningaforrit og leiðrÊttingar (ef uppsett)
- Comment[it]=Abilita gli strumenti per i dati come il dizionario dei sinonimi e il controllo ortografico (se installati)
--Comment[ja]=ĺ瞊čŞăăźăŤăăšăăŤăă§ăăŻăŞăŠăŽăăźăżăăźăŤăćĺšăŤăăžă ďźă¤ăłăšăăźăŤăăăŚăăĺ ´ĺďź
-+Comment[ja]=ĺ瞊čŞăăźăŤăăšăăŤăă§ăăŻăŞăŠăŽăăźăżăăźăŤăćĺšăŤăăžă (ă¤ăłăšăăźăŤăăăŚăăĺ ´ĺ)
- Comment[km]=áááážâá˛ááâá§áááááâááˇááááááâáááážâááśá ááźá
âááśâáááááâáááá
ááááá ááˇáâááˇááˇáááâá˘áááááśááˇááťáááâááśâáážá (áážâááśáâáááĄážá)
- Comment[ko]=(ęšë ¤ ěë¤ëŠ´) ëšěˇí ë§ ěŹě ęłź ë§ěś¤ë˛ ę˛ěŹę¸° ę°ě ë꾏뼟 ěëë¤
- Comment[lb]=HĂŤllefsprogrammer, wĂŠi ThĂŠsaurus an Rechtschreifkontroll, uschalten (wann installĂŠiert)
-Index: kate/plugins/insertfile/ktexteditor_insertfile.desktop
-===================================================================
---- kate/plugins/insertfile/ktexteditor_insertfile.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/plugins/insertfile/ktexteditor_insertfile.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -131,6 +131,7 @@
- Comment[vi]=Chèn bẼt káťł táşp tin cĂł khả nÄng Äáťc tấi váť trĂ cáť§a con chấy.
- Comment[zh_CN]=ĺ¨ĺ
ć ä˝ç˝Žćĺ
Ľäťťä˝ĺŻčŻťćäťś
- Comment[zh_HK]=ĺ¨ć¸¸ć¨čćĺ
ĽäťťćçćŞćĄ
-+Comment[zh_TW]=ĺ¨ć¸¸ć¨čćĺ
ĽäťťćçĺŻčŽćŞćĄ
- X-KDE-Library=ktexteditor_insertfile
- ServiceTypes=KTextEditor/Plugin
- Type=Service
-Index: kate/plugins/autobookmarker/ktexteditor_autobookmarker.desktop
-===================================================================
---- kate/plugins/autobookmarker/ktexteditor_autobookmarker.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/plugins/autobookmarker/ktexteditor_autobookmarker.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -110,6 +110,7 @@
- Comment[uk]=ĐŃŃанОвНŃŃ ĐˇĐ°ĐşĐťĐ°Đ´ĐşĐ¸ на ŃŃдкаŃ
, ŃĐž вŃдпОвŃдаŃŃŃ Đ˛ĐˇŃŃŃŃ, ĐżŃĐ´ ŃĐ°Ń ĐˇĐ°Đ˛Đ°Đ˝ŃĐ°ĐśĐľĐ˝Đ˝Ń Đ´ĐžĐşŃПонŃŃв
- Comment[vi]=Äạt ÄĂĄnh dẼu trĂŞn cĂĄc dòng kháťp máťt mẍu nĂ o ÄĂł khi tải tĂ i liáťu.
- Comment[zh_CN]=ć楣čŁ
ĺ
Ľćść šćŽĺšé
樥ĺźčŞĺ¨čŽžç˝ŽäšŚçž
-+Comment[zh_TW]=ćäťśčźĺ
Ľć䝼ĺ串ćŻĺ°ćźçŽćłäžč¨ĺŽć¸çą¤ă
- X-KDE-Library=ktexteditor_autobookmarker
- ServiceTypes=KTextEditor/Plugin
- Type=Service
+--- interfaces/kscript/sample/shellscript.desktop (.../tags/KDE/3.5.4/kdelibs) (revision 570931)
++++ interfaces/kscript/sample/shellscript.desktop (.../branches/KDE/3.5/kdelibs) (revision 570931)
+@@ -46,7 +46,7 @@
+ Name[ro]=Executor scripturi de interpretor
+ Name[ru]=ĐапŃŃĐş ŃĐşŃипŃОв bash
+ Name[rw]=Mutangiza Gaporogaramu Bash Shell
+-Name[se]=SkĂĄlĹžu skripta
++Name[se]=SkĂĄlĹžu-skriptavuodji
+ Name[sk]=Spustenie Bash shell skriptu
+ Name[sl]=Zaganjalnik lupinski skriptov
+ Name[sq]=Egzekutuesi i skriptave tĂŤ GuacĂŤs Bash
Index: kate/plugins/wordcompletion/ktexteditor_docwordcompletion.desktop
===================================================================
---- kate/plugins/wordcompletion/ktexteditor_docwordcompletion.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/plugins/wordcompletion/ktexteditor_docwordcompletion.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -57,6 +57,7 @@
- Name[vi]=Báť cáş§m phĂt Nháşp xong Tᝍ KTextEditor
- Name[zh_CN]=KTextEditor ĺčŻčĄĽĺ
¨ćäťś
- Name[zh_HK]=KTextEditor ćĺčŞĺčŁé˝ĺ¤ćç¨ĺź
-+Name[zh_TW]=KTextEditor ĺŽĺčŁĺŽĺ¤ćç¨ĺź
- Comment=Directional or popup-based completion from words in the document
- Comment[af]=Direksionele of opspring gebaseerde woord voltooiĂŻng van woorde in die dokument
- Comment[bg]=ĐвŃОПаŃиŃнО СавŃŃŃвано на Đ´ŃПи, йаСиŃанО на иСпОНСваниŃĐľ воŃĐľ Đ´ŃПи в дОкŃПонŃа
-@@ -111,6 +112,7 @@
- Comment[uk]=ĐавоŃŃĐľĐ˝Đ˝Ń ŃĐťŃв Ń Đ´ĐžĐşŃПонŃŃ. ĐŃŃПо айО на ĐžŃĐ˝ĐžĐ˛Ń Đ˛Đ¸ĐłŃĐťŃкнОгО ПонŃ
- Comment[vi]=Khả nÄng nháşp xong tᝍ trong tĂ i liáťu, Äáťąa vĂ o chiáťu hoạc vĂ o báť báşt lĂŞn.
- Comment[zh_CN]=ĺ¨ć楣ä¸ĺşäşćšĺćĺźšĺşčĄĽĺ
¨ĺčŻ
-+Comment[zh_TW]=ĺ¨çˇ¨čźŻćäťśćçĺŽĺčŁĺŽĺč˝
- X-KDE-Library=ktexteditor_docwordcompletion
- ServiceTypes=KTextEditor/Plugin
- Type=Service
-Index: kate/plugins/isearch/ktexteditor_isearch.desktop
-===================================================================
---- kate/plugins/isearch/ktexteditor_isearch.desktop (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/plugins/isearch/ktexteditor_isearch.desktop (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -128,6 +128,7 @@
- Comment[uk]=ТакОМ вŃдОПиК ŃĐş "ĐĐžŃŃĐş Са ввОдОП"
- Comment[vi]=CĹŠng Äưᝣc biáşżt như lĂ ÂŤ TĂŹm kiáşżm trong khi gĂľ Âť.
- Comment[zh_CN]=äšç§°ä¸şâĺłčžĺłćâ
-+Comment[zh_TW]=äšç¨ąĺăĺłććĺ°ă
- X-KDE-Library=ktexteditor_isearch
- ServiceTypes=KTextEditor/Plugin
- Type=Service
-Index: kate/part/katerenderer.cpp
-===================================================================
---- kate/part/katerenderer.cpp (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/katerenderer.cpp (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -34,9 +34,6 @@
- #include <qpainter.h>
- #include <qpopupmenu.h>
-
--static const QChar tabChar('\t');
--static const QChar spaceChar(' ');
--
- KateRenderer::KateRenderer(KateDocument* doc, KateView *view)
- : m_doc(doc), m_view (view), m_caretStyle(KateRenderer::Insert)
- , m_drawCaret(true)
-@@ -376,7 +373,7 @@
- if (showCursor && (cursor->col() >= int(startcol)))
- {
- cursorVisible = true;
-- cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(spaceChar);
-+ cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(QChar(' '));
- }
- }
- else
-@@ -417,7 +414,7 @@
- const uint lastIndentColumn = textLine->firstChar();
-
- // Could be precomputed.
-- const uint spaceWidth = fs->width (spaceChar, false, false, m_tabWidth);
-+ const uint spaceWidth = fs->width (QChar(' '), false, false, m_tabWidth);
-
- // Get current x position.
- int curPos = textLine->cursorX(curCol, m_tabWidth);
-@@ -425,12 +422,13 @@
- while (curCol - startcol < len)
- {
- // make sure curPos is updated correctly.
-- Q_ASSERT(curPos == textLine->cursorX(curCol, m_tabWidth));
-+ // ### if uncommented, causes an O(n^2) behaviour
-+ //Q_ASSERT(curPos == textLine->cursorX(curCol, m_tabWidth));
-
- QChar curChar = textLine->string()[curCol];
- // Decide if this character is a tab - we treat the spacing differently
- // TODO: move tab width calculation elsewhere?
-- bool isTab = curChar == tabChar;
-+ bool isTab = curChar == QChar('\t');
-
- // Determine current syntax highlighting attribute
- // A bit legacy but doesn't need to change
-@@ -497,7 +495,7 @@
- || (superRanges.count() && superRanges.currentBoundary() && *(superRanges.currentBoundary()) == KateTextCursor(line, nextCol))
-
- // it is the end of the line OR
-- || (curCol >= len - 1)
-+ || (curCol - startcol >= len - 1)
-
- // the rest of the line is trailing whitespace OR
- || (curCol + 1 >= trailingWhitespaceColumn)
-@@ -516,7 +514,7 @@
-
- // the next char is a tab (removed the "and this isn't" because that's dealt with above)
- // i.e. we have to draw the current text so the tab can be rendered as above.
-- || (textLine->string()[nextCol] == tabChar)
-+ || (textLine->string()[nextCol] == QChar('\t'))
-
- // input method edit area
- || ( m_view && (isIMEdit != m_view->isIMEdit( line, nextCol )) )
-@@ -698,11 +696,18 @@
- }
- }
-
-+ // If this line has a partial selection that's the start of a multi-line selection,
-+ // we have to fill areas on the right side of the text with the selection color.
-+ if (showSelections() && hasSel && !selectionPainted && xStart >= (int)xPos && m_view->lineEndSelected(line, -1))
-+ {
-+ paint.fillRect(0, 0, xEnd-xStart, fs->fontHeight, config()->selectionColor());
-+ }
-+
- // Determine cursor position (if it is not within the range being drawn)
- if (showCursor && (cursor->col() >= int(curCol)))
- {
- cursorVisible = true;
-- cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(spaceChar);
-+ cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(QChar(' '));
- cursorMaxWidth = xPosAfter - xPos;
- cursorColor = &oldAt->textColor();
- }
-@@ -733,29 +738,32 @@
- if (!textLine)
- return 0;
-
-- int len = textLine->length();
-+ const int len = textLine->length();
-
-- if (cursorCol < 0)
-+ if (cursorCol < 0 || cursorCol > len)
- cursorCol = len;
-
- KateFontStruct *fs = config()->fontStruct();
-
-+ const QChar *unicode = textLine->text();
-+ const QString &textString = textLine->string();
-+
- int x = 0;
- int width;
- for (int z = 0; z < cursorCol; z++) {
- KateAttribute* a = attribute(textLine->attribute(z));
-
- if (z < len) {
-- width = a->width(*fs, textLine->string(), z, m_tabWidth);
-+ width = a->width(*fs, textString, z, m_tabWidth);
- } else {
- // DF: commented out. It happens all the time.
- //Q_ASSERT(!m_doc->wrapCursor());
-- width = a->width(*fs, spaceChar, m_tabWidth);
-+ width = a->width(*fs, QChar(' '), m_tabWidth);
- }
-
- x += width;
-
-- if (textLine->getChar(z) == tabChar)
-+ if (unicode[z] == QChar('\t'))
- x -= x % width;
- }
-
-@@ -778,15 +786,19 @@
-
- *needWrap = false;
-
-+ const uint len = textLine->length();
-+ const QChar *unicode = textLine->text();
-+ const QString &textString = textLine->string();
-+
- uint z = startcol;
-- for (; z < textLine->length(); z++)
-+ for (; z < len; z++)
- {
- KateAttribute* a = attribute(textLine->attribute(z));
-- int width = a->width(*fs, textLine->string(), z, m_tabWidth);
-+ int width = a->width(*fs, textString, z, m_tabWidth);
- Q_ASSERT(width);
- x += width;
-
-- if (textLine->getChar(z).isSpace())
-+ if (unicode[z].isSpace())
- {
- lastWhiteSpace = z+1;
- lastWhiteSpaceX = x;
-@@ -806,7 +818,7 @@
-
- // How should tabs be treated when they word-wrap on a print-out?
- // if startcol != 0, this messes up (then again, word wrapping messes up anyway)
-- if (textLine->getChar(z) == tabChar)
-+ if (unicode[z] == QChar('\t'))
- x -= x % width;
-
- if (x <= maxwidth)
-@@ -864,7 +876,6 @@
- uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
- {
- bool wrapCursor = m_view->wrapCursor();
-- int len;
- int x, oldX;
-
- KateFontStruct *fs = config()->fontStruct();
-@@ -875,10 +886,12 @@
-
- if (!textLine) return 0;
-
-- len = textLine->length();
-+ const uint len = textLine->length();
-+ const QChar *unicode = textLine->text();
-+ const QString &textString = textLine->string();
-
- x = oldX = 0;
-- int z = startCol;
-+ uint z = startCol;
- while (x < xPos && (!wrapCursor || z < len)) {
- oldX = x;
-
-@@ -887,13 +900,13 @@
- int width = 0;
-
- if (z < len)
-- width = a->width(*fs, textLine->string(), z, m_tabWidth);
-+ width = a->width(*fs, textString, z, m_tabWidth);
- else
-- width = a->width(*fs, spaceChar, m_tabWidth);
-+ width = a->width(*fs, QChar(' '), m_tabWidth);
-
- x += width;
-
-- if (textLine->getChar(z) == tabChar)
-+ if (z < len && unicode[z] == QChar('\t'))
- x -= x % width;
-
- z++;
-@@ -933,12 +946,14 @@
- x = oldX = 0;
-
- uint z = startCol;
-- uint len= textLine->length();
-+ const uint len = textLine->length();
-+ const QString &textString = textLine->string();
-+
- while ( (x < xPos) && (z < len)) {
- oldX = x;
-
- KateAttribute* a = attribute(textLine->attribute(z));
-- x += a->width(*fs, textLine->string(), z, m_tabWidth);
-+ x += a->width(*fs, textString, z, m_tabWidth);
-
- z++;
- }
-@@ -1011,7 +1026,7 @@
-
- uint KateRenderer::spaceWidth()
- {
-- return attribute(0)->width(*config()->fontStruct(), spaceChar, m_tabWidth);
-+ return attribute(0)->width(*config()->fontStruct(), QChar(' '), m_tabWidth);
- }
-
- // kate: space-indent on; indent-width 2; replace-tabs on;
-Index: kate/part/katehighlight.cpp
-===================================================================
---- kate/part/katehighlight.cpp (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/katehighlight.cpp (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -1522,7 +1522,7 @@
- // even set attributes ;)
- memset ( textLine->attributes()+offset
- , item->onlyConsume ? context->attr : item->attr
-- , len-offset);
-+ , offset2-offset);
-
- offset = offset2;
- lastChar = text[offset-1];
-@@ -2080,8 +2080,8 @@
-
- bool KateHighlighting::isInWord( QChar c, int attrib ) const
- {
-- static const QString& sq = KGlobal::staticQString(" \"'");
-- return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0 && sq.find(c) < 0;
-+ return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0
-+ && !c.isSpace() && c != '"' && c != '\'';
- }
-
- bool KateHighlighting::canBreakAt( QChar c, int attrib ) const
-Index: kate/part/kateviewinternal.h
-===================================================================
---- kate/part/kateviewinternal.h (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/kateviewinternal.h (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -190,7 +190,6 @@
-
- private:
- void moveChar( Bias bias, bool sel );
-- void moveWord( Bias bias, bool sel );
- void moveEdge( Bias bias, bool sel );
- KateTextCursor maxStartPos(bool changed = false);
- void scrollPos(KateTextCursor& c, bool force = false, bool calledExternally = false);
-@@ -269,7 +268,6 @@
- //
- QScrollBar *m_columnScroll;
- int m_startX;
-- int m_oldStartX;
-
- // has selection changed while your mouse or shift key is pressed
- bool m_selChangedByUser;
-@@ -363,10 +361,6 @@
- static const int scrollTime = 30;
- static const int scrollMargin = 16;
-
-- // dyn wrap mode:
-- // used to set the lineScroll to the max value
-- bool m_maximizeLineScroll;
--
- private slots:
- void scrollTimeout ();
- void cursorTimeout ();
-Index: kate/part/katetextline.cpp
-===================================================================
---- kate/part/katetextline.cpp (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/katetextline.cpp (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -109,9 +109,12 @@
-
- int KateTextLine::nextNonSpaceChar(uint pos) const
- {
-- for(int i = pos; i < (int)m_text.length(); i++)
-+ const uint len = m_text.length();
-+ const QChar *unicode = m_text.unicode();
-+
-+ for(uint i = pos; i < len; i++)
- {
-- if(!m_text[i].isSpace())
-+ if(!unicode[i].isSpace())
- return i;
- }
-
-@@ -120,12 +123,16 @@
-
- int KateTextLine::previousNonSpaceChar(uint pos) const
- {
-- if (pos >= m_text.length())
-- pos = m_text.length() - 1;
-+ const int len = m_text.length();
-
-+ if (pos >= (uint)len)
-+ pos = len - 1;
-+
-+ const QChar *unicode = m_text.unicode();
-+
- for(int i = pos; i >= 0; i--)
- {
-- if(!m_text[i].isSpace())
-+ if(!unicode[i].isSpace())
- return i;
- }
-
-@@ -151,12 +158,14 @@
- uint KateTextLine::indentDepth (uint tabwidth) const
- {
- uint d = 0;
-+ const uint len = m_text.length();
-+ const QChar *unicode = m_text.unicode();
-
-- for(uint i = 0; i < m_text.length(); i++)
-+ for(uint i = 0; i < len; i++)
- {
-- if(m_text[i].isSpace())
-+ if(unicode[i].isSpace())
- {
-- if (m_text[i] == QChar('\t'))
-+ if (unicode[i] == QChar('\t'))
- d += tabwidth - (d % tabwidth);
- else
- d++;
-@@ -170,11 +179,21 @@
-
- bool KateTextLine::stringAtPos(uint pos, const QString& match) const
- {
-- if ((pos+match.length()) > m_text.length())
-+ const uint len = m_text.length();
-+ const uint matchlen = match.length();
-+
-+ if ((pos+matchlen) > len)
- return false;
-
-- for (uint i=0; i < match.length(); i++)
-- if (m_text[i+pos] != match[i])
-+ // (pos > len) in case the uint pos was assigned a signed -1, pos+matchlen can
-+ // overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580
-+ Q_ASSERT(pos < len);
-+
-+ const QChar *unicode = m_text.unicode();
-+ const QChar *matchUnicode = match.unicode();
-+
-+ for (uint i=0; i < matchlen; i++)
-+ if (unicode[i+pos] != matchUnicode[i])
- return false;
-
- return true;
-@@ -182,11 +201,16 @@
-
- bool KateTextLine::startingWith(const QString& match) const
- {
-- if (match.length() > m_text.length())
-+ const uint matchlen = match.length();
-+
-+ if (matchlen > m_text.length())
- return false;
-
-- for (uint i=0; i < match.length(); i++)
-- if (m_text[i] != match[i])
-+ const QChar *unicode = m_text.unicode();
-+ const QChar *matchUnicode = match.unicode();
-+
-+ for (uint i=0; i < matchlen; i++)
-+ if (unicode[i] != matchUnicode[i])
- return false;
-
- return true;
-@@ -194,12 +218,17 @@
-
- bool KateTextLine::endingWith(const QString& match) const
- {
-- if (match.length() > m_text.length())
-+ const uint matchlen = match.length();
-+
-+ if (matchlen > m_text.length())
- return false;
-
-- uint start = m_text.length() - match.length();
-- for (uint i=0; i < match.length(); i++)
-- if (m_text[start+i] != match[i])
-+ const QChar *unicode = m_text.unicode();
-+ const QChar *matchUnicode = match.unicode();
-+
-+ uint start = m_text.length() - matchlen;
-+ for (uint i=0; i < matchlen; i++)
-+ if (unicode[start+i] != matchUnicode[i])
- return false;
-
- return true;
-@@ -209,9 +238,12 @@
- {
- uint x = 0;
-
-- for ( uint z = 0; z < kMin (pos, m_text.length()); z++)
-+ const uint n = kMin (pos, m_text.length());
-+ const QChar *unicode = m_text.unicode();
-+
-+ for ( uint z = 0; z < n; z++)
- {
-- if (m_text[z] == QChar('\t'))
-+ if (unicode[z] == QChar('\t'))
- x += tabChars - (x % tabChars);
- else
- x++;
-@@ -224,10 +256,12 @@
- uint KateTextLine::lengthWithTabs (uint tabChars) const
- {
- uint x = 0;
-+ const uint len = m_text.length();
-+ const QChar *unicode = m_text.unicode();
-
-- for ( uint z = 0; z < m_text.length(); z++)
-+ for ( uint z = 0; z < len; z++)
- {
-- if (m_text[z] == QChar('\t'))
-+ if (unicode[z] == QChar('\t'))
- x += tabChars - (x % tabChars);
- else
- x++;
-Index: kate/part/katebuffer.cpp
-===================================================================
---- kate/part/katebuffer.cpp (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/katebuffer.cpp (.../branches/KDE/3.5/kdelibs) (revision 556696)
-@@ -807,6 +807,10 @@
- // cu block !
- delete buf;
- m_blocks.erase (m_blocks.begin()+index);
-+
-+ // make sure we don't keep a pointer to the deleted block
-+ if( m_lastInSyncBlock >= index )
-+ m_lastInSyncBlock = index - 1;
- }
- else
- {
-@@ -866,6 +870,10 @@
-
- h->use();
-
-+ // Clear code folding tree (see bug #124102)
-+ m_regionTree.clear();
-+ m_regionTree.fixRoot(m_lines);
-+
- // try to set indentation
- if (!h->indentation().isEmpty())
- m_doc->config()->setIndentationMode (KateAutoIndent::modeNumber(h->indentation()));
-Index: kate/part/kateschema.cpp
-===================================================================
---- kate/part/kateschema.cpp (.../tags/KDE/3.5.3/kdelibs) (revision 556696)
-+++ kate/part/kateschema.cpp (.../branches/KDE/3.5/kdelibs) (revision 556696)
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/kdelibs-branch.diff?r1=1.27&r2=1.28&f=u
More information about the pld-cvs-commit
mailing list