diff --git a/DataOutput/src/TranSlf2Data.cpp b/DataOutput/src/TranSlf2Data.cpp index 2fb23f0..6b55071 100644 --- a/DataOutput/src/TranSlf2Data.cpp +++ b/DataOutput/src/TranSlf2Data.cpp @@ -1750,9 +1750,9 @@ void TranToDat(CMemRdWt *mrw,QString Outfile,float Outsdep,float Outedep,float O if(ss.suffix().isEmpty()) cs=cs+".dat"; else if(ss.suffix().compare("dat",Qt::CaseInsensitive)) cs.replace("."+ss.suffix(),".dat"); if(ss.exists()) { - CString str; - str.Format("当前dat文件%s已存在,是否覆盖?",Outfile.toUtf8().data()); - if(QMessageBox::information(NULL,"提示",QString(str.GetString()),QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) + QString str; + str = "当前dat文件" + Outfile + "已存在,是否覆盖?"; + if(QMessageBox::information(NULL,"提示", str ,QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) { QDir ss; ss.remove(cs); @@ -1946,8 +1946,9 @@ void TranToWis(CMemRdWt *mrw,QString Outfile,float Outsdep,float Outedep,float O QFile w(Outfile); if(w.exists()) { - str.Format("当前wis文件%s已存在,是否覆盖?",Outfile.toUtf8().data()); - if(QMessageBox::information(NULL,"提示",QString(str.GetString()),QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) + QString str; + str = "当前wis文件" + Outfile + "已存在,是否覆盖?"; + if(QMessageBox::information(NULL,"提示", str ,QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) { w.remove(); } @@ -2718,14 +2719,15 @@ void TranToLis(CMemRdWt *mrw,QString Outfile,float Outsdep,float Outedep,float O if(Outedep == -9999.0) Outedep = maxedep; if(Outrlev == -9999.0) Outrlev = maxrlev; - - CString str; + QString str; //打开xtf文件 QFile w(Outfile); if(w.exists()) { - str.Format("当前Lis文件%s已存在,是否覆盖?",Outfile.toUtf8().data()); - if(QMessageBox::information(NULL,"提示",QString(str.GetString()),QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) + // str.Format("当前Lis文件%s已存在,是否覆盖?",Outfile.toUtf8().data()); + // if(QMessageBox::information(NULL,"提示",QString(str.GetString()),QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) + str = "当前Lis文件" + Outfile + "已存在,是否覆盖?"; + if(QMessageBox::information(NULL,"提示",str,QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) { w.remove(); } @@ -2739,7 +2741,8 @@ void TranToLis(CMemRdWt *mrw,QString Outfile,float Outsdep,float Outedep,float O int ret=lis_lib.OpenDataFile(Outfile,1); if(ret<1) { - str.Format("%s 创建失败 !!!",Outfile.toUtf8().data()); + // str.Format("%s 创建失败 !!!",Outfile.toUtf8().data()); + str = Outfile + " 创建失败 !!!"; AfxMessageBox(str); return; } @@ -3025,13 +3028,13 @@ void TranToXtf(CMemRdWt *mrw,QString Outfile,float Outsdep,float Outedep,float O tempr = Outrlev; //遗留问题:只处理了ushort、short或float三种数据类型 - CString str; + QString str; //打开xtf文件 QFile w(Outfile); if(w.exists()) { - str.Format("当前xtf文件%s已存在,是否覆盖?",Outfile.toUtf8().data()); - if(QMessageBox::information(NULL,"提示",QString(str.GetString()),QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) + str = "当前xtf文件" + Outfile + "已存在,是否覆盖?"; + if(QMessageBox::information(NULL,"提示",str,QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) { w.remove(); }