https://bugs.kde.org/show_bug.cgi?id=448353

--- Comment #5 from michael <reeves...@gmail.com> ---
Just rewrote the offending section of code. The LF lines would not have
triggered the QTextStream::pos() so it does seem to be the culprit. Turns there
were odd EOL corner cases that the didn't get detected right 

The new code should fix both issues.

            case '\r':
                if((FileOffset)lastOffset < mDataSize)
                {
                    prevChar = curChar;
                    curChar = ts.read(1).unicode()[0];

                    if(curChar == '\n')
                    {
                        vOrigDataLineEndStyle.push_back(eLineEndStyleDos);
                        break;
                    }
                    //work around for lack of seek API in QTextStream
                    skipNextRead = true;
                }

                //old mac style ending.
                vOrigDataLineEndStyle.push_back(eLineEndStyleUndefined);
                break;

The speed now should only depend on the time for QTextStream::read.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to