You are not logged in.

#1 2009-03-20 20:19:38

pano
Member
From: Stuttgart, Germany
Registered: 2008-09-08
Posts: 118

lokalize does not work correctly after upgrading to 4.2.1

Hi,

I recently noticed the following:

Lokalize does not work correctly on my machine with KDE 4,2,1.
While I had 4.2.0 it worked like a charm, but since I updated to 4.2.1 it does not...
At first I had to remove  ~/.kde4/share/apps/lokalize/*.db because lokalize was complaining about those databases, and refused to start but still was using up to 50% of my CPU.
After removing those files, lokalize starts up, but if you load a po file, it locks up after a short while.


thank you

pano

Offline

#2 2009-03-20 21:03:54

delacruz
Member
From: /home/houston
Registered: 2007-12-09
Posts: 102

Re: lokalize does not work correctly after upgrading to 4.2.1

i cant even seem to find lokalize in pacman.

Offline

#3 2009-03-20 21:05:40

pano
Member
From: Stuttgart, Germany
Registered: 2008-09-08
Posts: 118

Re: lokalize does not work correctly after upgrading to 4.2.1

lokalize is in the "kdesdk" package
smile

pano

Offline

#4 2009-03-23 12:13:15

jotapesan
Member
From: chile
Registered: 2006-05-30
Posts: 27
Website

Re: lokalize does not work correctly after upgrading to 4.2.1

i can confirm this bug. Threre's a bug report in KDE bug trackerhttps://bugs.kde.org/show_bug.cgi?id=187764

Last edited by jotapesan (2009-03-23 12:21:46)

Offline

#5 2009-03-23 13:04:54

jotapesan
Member
From: chile
Registered: 2006-05-30
Posts: 27
Website

Re: lokalize does not work correctly after upgrading to 4.2.1

the problem is the sintax highlighter. I fixed the problem applying this patch:

--- syntaxhighlighter.cpp.original      2009-03-23 09:03:35.000000000 -0400
+++ syntaxhighlighter.cpp       2009-03-23 09:03:44.000000000 -0400
@@ -166,14 +166,15 @@
     foreach (const HighlightingRule &rule, highlightingRules)
     {
         QRegExp expression(rule.pattern);
-        int index = text.indexOf(expression);
+        int index = expression.indexIn(text);
         while (index >= 0)
         {
             int length = expression.matchedLength();
             QTextCharFormat f=rule.format;
             f.setFontItalic(!m_approved);
             setFormat(index, length, f);
-            index = text.indexOf(expression, index + length);
+       index = expression.indexIn(text, index + length);
         }
     }

Offline

#6 2009-03-23 17:47:44

pano
Member
From: Stuttgart, Germany
Registered: 2008-09-08
Posts: 118

Re: lokalize does not work correctly after upgrading to 4.2.1

hi (nice to see you also on the arch forum big_smile)!
Lokalize indeed works after patching the source code, but I had to edit the diff a little (for some reason it didn't patch properly with your version) (edit: it didn't patch correctly, because you forgot the post the last empty line)

--- kdesdk-4.2.1/lokalize/src/syntaxhighlighter.cpp.original    2009-03-23 17:34:06.000000000 +0100
+++ kdesdk-4.2.1/lokalize/src/syntaxhighlighter.cpp    2009-03-23 17:28:46.000000000 +0100
@@ -166,14 +166,14 @@
     foreach (const HighlightingRule &rule, highlightingRules)
     {
         QRegExp expression(rule.pattern);
-        int index = text.indexOf(expression);
+          int index = text.indexOf(expression);
         while (index >= 0)
         {
             int length = expression.matchedLength();
             QTextCharFormat f=rule.format;
             f.setFontItalic(!m_approved);
             setFormat(index, length, f);
-            index = text.indexOf(expression, index + length);
+         index = text.indexOf(expression, index + length);
         }
     }

(don't froget the empty line after the '}' )

I also emailed the packager of the kdesdk package and sent him the patch (your patch with my modifications big_smile)


pano

Last edited by pano (2009-03-23 18:29:09)

Offline

Board footer

Powered by FluxBB