#include <QStatusBar>
#include <QCloseEvent>
#include <QFileDialog>
+#include <QFileInfo>
#include <QApplication>
/*!Create and return new instance of STD_Application*/
/*! \retval true, if document was opened successful, else false.*/
bool STD_Application::onOpenDoc( const QString& aName )
{
+ bool res = false;
+
+ if ( !QFileInfo( aName ).exists() )
+ {
+ SUIT_MessageBox::critical( desktop(), tr( "ERR_ERROR" ),
+ tr( "MSG_FILE_NOT_EXISTS" ).arg( aName ) );
+ return res;
+ }
+
QApplication::setOverrideCursor( Qt::WaitCursor );
- bool res = openAction( openChoice( aName ), aName );
+ res = openAction( openChoice( aName ), aName );
QApplication::restoreOverrideCursor();
<source>CLOSE_QUESTION</source>
<translation>Do you want to save study before closing?</translation>
</message>
+ <message>
+ <source>MSG_FILE_NOT_EXISTS</source>
+ <translation>
+ Most recent file cannot be loaded.
+ File "%1" not exists.
+ </translation>
+ </message>
</context>
</TS>