if ( checkPermission && !QFileInfo( fileName ).isReadable() ) {
if ( parent() )
SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
- QObject::tr( "ERR_PERMISSION_DENIED" ).arg( fileName ) );
+ QObject::tr( "ERR_OPEN_PERMISSION_DENIED" ).arg( fileName ) );
return false;
}
return true;
}
else {
QString dirName = SUIT_Tools::dir( fileName );
+ if ( !QFile::exists( dirName ) ) {
+ SUIT_MessageBox::critical( parent(), QObject::tr( "WRN_WARNING" ),
+ QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
+ return false;
+ }
if ( checkPermission && !QFileInfo( dirName ).isWritable() ) {
if ( parent() )
SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
if ( checkPermission && !info.isReadable() ) {
if ( parent() )
SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
- QObject::tr( "ERR_PERMISSION_DENIED" ).arg( dirName ) );
+ QObject::tr( "ERR_DIR_READ_PERMISSION_DENIED" ).arg( dirName ) );
return false;
}
return true;
if ( checkPermission && !info.isWritable() ) {
if ( parent() )
SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
- QObject::tr( "ERR_PERMISSION_DENIED" ).arg( dirName ) );
+ QObject::tr( "ERR_DIR_WRITE_PERMISSION_DENIED" ).arg( dirName ) );
return false;
}
return true;
<message>
<source>ERR_PERMISSION_DENIED</source>
<translation>Can't save file "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_OPEN_PERMISSION_DENIED</source>
+ <translation>Can't open file "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+ <translation>Can't read directory "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+ <translation>Can't write directory "%1".
Permission denied.</translation>
</message>
<message>