file saving

MeMpHiStO walls at alleg.edu
Wed Feb 9 22:40:33 GMT 2000


when i use the following method to save a text file, it chops off the
first line.  i am reading into lineData all of the text from the current
QMultiLineEdit window.  any ideas what is wrong?

bool WalTeKDoc::saveDocument(const QString &filename, const char *format
/*=0*/)
{
  QFile file(filename);
  if (!file.open(IO_WriteOnly))
    return false;
  QString lineData;
  char *s;
  QDataStream out(&file);
  lineData = (pViewList->current())->text();
  out << lineData;
  file.close();
  modified=false;
  return true;
}

--

"What? Is man merely a mistake of God's? Or God merely a mistake of man's?
 -Nietzsche


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20000209/3d44fff9/attachment.html>


More information about the KDevelop mailing list