[Interest] qnam ftp : error

Thiago Macieira thiago.macieira at intel.com
Mon Jul 16 16:18:59 CEST 2012


On segunda-feira, 16 de julho de 2012 15.59.36, qtnext wrote:
> Hi,
> 
> I am trying to use QNam instead of Qftp (because depreciated) to upload and
> download file on Qt4.8.2 Windows :
> I works fine when there is no problem ... but it seems difficult to provide
> valuable information to user when there is a problem (login false, password
> false, host false).
> 
> If I download a file with bad parametre, i have "Content operation not
> permitted Error" ...
> If I upload a file with bad parametre, I have no feedback :no signal error
> ... nothing ..  (I have connect signals like this :  connect(m_reply, SIGNAL
> (error(QNetworkReply::NetworkError)),this,SLOT(_error(QNetworkReply::
> NetworkError)));

If the host was not found, the QNetworkReply will have an error code of 
QNetworkReply::HostNotFoundError.

If the FTP server did not accept the connection, it will be 
QNetworkReply::ConnectionRefusedError.

If the login failed, the error will be 
QNetworkReply::AuthenticationRequiredError.

If the file you're trying to download could not be found, you'll get 
QNetworkReply::ContentNotFoundError.

For the upload case, if the server did not accept the file, you'll get 
QNetworkReply::ContentAccessDenied.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120716/9d6db066/attachment.sig>


More information about the Interest mailing list