你好,我最近在写一个关于FTP服务器的程序,运行的时候在上传文件时出现这个问题
Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
这是上传的代码,可以帮我看看哪里出问题了吗?
void Widget::on_pushButton_clicked(){
QString temp;
temp= ui->fileList->currentItem()->text(0);
const QString& localFile= QFileDialog::getOpenFileName(0, tr("upload file dialog"),temp);//打开本地文件夹
/*if (QFile::exists(localFile)) {
QMessageBox::information(this, tr("FTP"), tr("There already exists a file called %1 in " "the current directory.") .arg(localFile));
return; }*/
if (localFile.isNull()) return;
file=new QFile(localFile);
//file->setFileName(localFile);//设置文件名
ui->fileList->clear();
if (!file->open(QIODevice::ReadWrite)) {
QMessageBox::information(this, tr("FTP"), tr("Not upload to save the file %1: %2.") .arg(localFile).arg(file->errorString()));
return;
}
else {
progressDialog->setLabelText(tr("Uploading %1...").arg(localFile));
QFileInfo fi(localFile);
ftp->put(file, fi.fileName());
progressDialog->show();
isDirectory.clear();
ftp->list(); }}