title: C++ Qt cannot read the whole text file
body: <p>I'm writing a tool for private use. The problem is that Qt cannot read a text file containing <a href="http://pastebin.com/shYSgihU" rel="nofollow">all contents published here</a>.</p>
  
  <p>It only reads <a href="http://pastebin.com/HgRbbSpA" rel="nofollow">this</a>
  The three points were pasted by Qt.</p>
  
  <p>My code for reading the file is following</p>
  
  <pre><code>QFile file;
  file.setFileName(m_filename);
  if (!file.open(QIODevice::ReadOnly))
      return;
  
  QTextStream in(&amp;file);
  
  while (!in.atEnd()) {
      m_fileContents += in.readLine();
  }
  file.close();
  </code></pre>
  
  <p>Do you have any idea why it doesn't work?</p>