PDA

View Full Version : QFtp weird problem on windows



vcp
19th August 2009, 15:13
Hi People,

My problem with the QFtp is:

The same program works fine in the Linux, but in the Windows the file that dowloaded stayed lacking bytes.

I don't understand what happens. I'm using QT 4.5.2 in both plataforms.

The code is a variation of QT4 QFtp examples.

See:
bool ProgUpdate::downloadFile()
{

#ifdef Q_OS_WIN32
file = new QFile("C:/Arquivos de Programas/qDocLib2/"+progName);
#else
file = new QFile(progName);
#endif
if(!file->open(QIODevice::WriteOnly)) {
qsError = trUtf8("ImpossÃ*vel salvar o arquivo %1. Erro: %2.").arg(progName).arg(file->errorString());
emit messages(qsError);
delete file;
return(FALSE);
}

get(progName, file);

progressDialog->setLabelText(trUtf8("Download %0...").arg(progName));
progressDialog->exec();

close();
return(TRUE);
}

Any help will be thanked