[Qt-interest] working with qfile

Thiago Macieira thiago at kde.org
Mon Sep 26 15:41:24 CEST 2011


On Monday, 26 de September de 2011 18:50:00 Sahana Bhaskar wrote:
> I am working on visual studio 6.0 where I think sed is a unix concept.

Qt also doesn't support Visual Studio 6.0 anymore.

The first thing you need to understand about files is that in-place changes are 
very hard to achieve. Your best bet is to create a temporary file and do a 
stream replacement (just like sed) and finally copy the temporary back on top 
of the original.

That's how sed -i works.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110926/3ea0f1f5/attachment.bin 


More information about the Qt-interest-old mailing list