[Qt-interest] working with qfile
Atlant Schmidt
aschmidt at dekaresearch.com
Mon Sep 26 17:00:38 CEST 2011
Sahana:
You haven’t told us whether you need to:
1. Replace the text in the existing file, or
2. Simply replace the text on reading, processing the
text stream as if it had contained the replacement text.
That second task is easier and the “regexp” formula another person
has shown you (or even just .contains()) is the key in either case.
Atlant
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Sahana Bhaskar
Sent: Monday, September 26, 2011 09:15
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] working with qfile
Hi all,
I am trying to read a text file using the qfiles. I need to see if the file contains a specific string and if it does I need to replace the whole line with a new line. I tried using QTextStream. Could anyone please help me out with this?
Thanks,
Sahana
Click here<https://www.mailcontrol.com/sr/6b5ZwOuIM4zTndxI!oX7Ul+sZxelw3DRKFWjhiUEs515gBXsZFQBPqu3SH38UcgzrpKQrgjPFD9ICd5VsZuQpQ==> to report this email as spam.
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110926/592d8075/attachment.html
More information about the Qt-interest-old
mailing list