If I copy a resource file to a tmp cache dir... so...
MoveAndCopy(QString::fromUtf8(":/images/images/master.sql"),STATIC_TMP_SQL_DUMP);
after this file is readonly to user....
How i set write and remove from application? and edit from user?
{
if (db->is_file(destfile)) {
db->qt_unlink(destfile);
}
if (!Image.copy(destfile)) {
/*QMessageBox::warning( this,tr( "File Error!" ) , tr("Unable to copy a file to.. %1").arg( destfile ));*/
return false;
} else {
Image2.
setPermissions(QFile::WriteOther);
/* all 0777 */ return true;
}
}
bool Gui_Front::MoveAndCopy(QString file, QString destfile)
{
QFile Image(file);
if (db->is_file(destfile)) {
db->qt_unlink(destfile);
}
if (!Image.copy(destfile)) {
/*QMessageBox::warning( this,tr( "File Error!" ) , tr("Unable to copy a file to.. %1").arg( destfile ));*/
return false;
} else {
QFile Image2(destfile);
Image2.setPermissions(QFile::WriteOther); /* all 0777 */
return true;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks