Porting DrKonqi away from K3Process: problem with working directory

Andreas Pakulat apaku at gmx.de
Sat Jan 19 14:14:25 GMT 2008


On 19.01.08 14:41:09, Urs Wolfer wrote:
> +{
> +    int pos;
> +    while ((pos = m_output.indexOf('\n')) != -1) {
> +        QString line = QString::fromLocal8Bit(m_output, pos + 1);
> +        m_output.remove(0, pos + 1);
> +
> +        m_strBt.append(line);
> +        emit append(line);
> +    }
>  }

I'm not really sure, but you might want to use setNextOpenMode to set
QIODevice::Text, as that makes it unessecary to check for \r\n here as
well - to be cross-platform.

The rest has already been said by Oswald.

Andreas

-- 
You will have long and healthy life.




More information about the kde-core-devel mailing list