From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kate/scripts/script-indent-c1-test.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kate/scripts') diff --git a/kate/scripts/script-indent-c1-test.lua b/kate/scripts/script-indent-c1-test.lua index d2593b962..c54f20424 100644 --- a/kate/scripts/script-indent-c1-test.lua +++ b/kate/scripts/script-indent-c1-test.lua @@ -15,12 +15,12 @@ function indentChar(c) -- unindent } and {, if not in a comment - if not(string.find(textLine,"^%s*//")) then + if not(string.tqfind(textLine,"^%s*//")) then katedebug("no comment") katedebug(c); if (c=="}") or (c=="{") then katedebug("} or { found"); - if (string.find(textLine,"^%s%s%s%s")) then + if (string.tqfind(textLine,"^%s%s%s%s")) then katedebug("removing one indentation level"); document.removeText(line,0,line,tabWidth) view.setCursorPositionReal(line,col-tabWidth) @@ -60,7 +60,7 @@ function indentNewLine() function firstNonSpace( text ) - local pos=string.find(text,"[^%s]") + local pos=string.tqfind(text,"[^%s]") if pos then return pos else @@ -69,7 +69,7 @@ function indentNewLine() end function lastNonSpace (text) - local pos=string.find(text,"[^%s]%s*$") + local pos=string.tqfind(text,"[^%s]%s*$") if pos then return pos else @@ -88,7 +88,7 @@ function indentNewLine() strCurrentLine=document.textLine(intCurrentLine) intLastChar= lastNonSpace(strCurrentLine) intFirstChar=firstNonSpace(strCurrentLine) - if not (string.find(strCurrentLine,"//")) then + if not (string.tqfind(strCurrentLine,"//")) then for intCurrentChar=intLastChar,intFirstChar,-1 do ch=string.sub(strCurrentLine,intCurrentChar,intCurrentChar) if (ch=="(") or (ch=="[") then @@ -122,7 +122,7 @@ function indentNewLine() katedebug( "line: " .. intCurrentLine) katedebug( openParenCount .. ", " .. openBraceCount) - local ok,match=pcall(function () return string.sub(strCurrentLine,string.find(strCurrentLine,"^%s+")) end) + local ok,match=pcall(function () return string.sub(strCurrentLine,string.tqfind(strCurrentLine,"^%s+")) end) if ok then katedebug("Line HAD leading whitespaces") strIndentFiller=match -- cgit v1.2.1