diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kate/scripts | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
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
Diffstat (limited to 'kate/scripts')
-rw-r--r-- | kate/scripts/script-indent-c1-test.lua | 12 |
1 files changed, 6 insertions, 6 deletions
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 |