bool ResigerWidget::copyFileToPathA(QString sourceDir ,QString toDir, bool coverFileIfExist)
{
toDir.replace("\\","/");
if (sourceDir == toDir){
//qDebug()<< "aa";
return true;
}
if (!QFile::exists(sourceDir)){
//qDebug()<< "aa1";
return false;
}
QDir *createfile = new QDir;
bool exist = createfile->exists(toDir);
if (exist){
if(coverFileIfExist){
createfile->remove(toDir);
}
}//end if

if(!QFile::copy(sourceDir, toDir))
{
qDebug()<< "sourceDir"<<sourceDir;
qDebug()<< "toDir"<<toDir;
qDebug()<< "aa2";
return false;
}
return true;
}