title: QNetworkAccessManager::put - QIODevice::read: device not open after sending file to ftp server
body: <p>When I'm sending file to ftp server and I receive message QIODevice::read: device not open (after sent this file..)</p>
  <p>Output looks like this:</p>
  <blockquote>
  <p>Uploaded 1673 of 1673</p>
  <p>QIODevice::read: device not open</p>
  <p>Finished 0</p>
  </blockquote>
  <pre><code>#include &quot;uploader.h&quot;
   
  Uploader::Uploader(QObject *parent) :
      QObject(parent)
  {
  }
   
  void Uploader::start(const QString &amp;fileName) {
      QUrl url(&quot;ftp://adresIP/test/tt.txt&quot;);
      url.setUserName(&quot;ftp@domena.pl&quot;);
      url.setPassword(&quot;passwd&quot;);
   
      file = new QFile(fileName);
   
      QByteArray putData;
   
      file-&gt;open(QIODevice::ReadOnly);
   
      putData.append(file-&gt;readAll());
   
      //-- other attempts
      file-&gt;flush();
      file-&gt;close();
      delete file;
      //--
   
      reply = nam.put(QNetworkRequest(url), putData);
      connect(reply, SIGNAL(uploadProgress(qint64, qint64)), this, SLOT(uploadProgress(qint64, qint64)));
      connect(reply, SIGNAL(finished()), this, SLOT(uploadDone()));
   
  }
   
   
  void Uploader::uploadProgress(qint64 bytesSent, qint64 bytesTotal) {
      qDebug() &lt;&lt; &quot;Uploaded&quot; &lt;&lt; bytesSent &lt;&lt; &quot;of&quot; &lt;&lt; bytesTotal;
  }
   
  void Uploader::uploadDone() {
      qDebug() &lt;&lt; &quot;Finished&quot; &lt;&lt; reply-&gt;error();
   
      reply-&gt;deleteLater();
  }
   
  //uploader.h
     QNetworkAccessManager nam;
     QFile *file;
     QNetworkReply *reply;
   
  //main.cpp
  Uploader u;
  u.start(&quot;F:\\song.mp3&quot;);
  </code></pre>
  <p><strong>EDIT:</strong></p>
  <p>I made a test on Qt 5.0.1, on Ubuntu (before it was Windows, Qt 5.3) and here it's everything OK ( message <code>QIODevice::read: device not open</code> is not displayed..). It could be Qt Framework bug ?</p>