You are not logged in.
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
i cant even seem to find lokalize in pacman.
Offline
lokalize is in the "kdesdk" package
pano
Offline
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
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
hi (nice to see you also on the arch forum )!
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 )
pano
Last edited by pano (2009-03-23 18:29:09)
Offline