From bfb04d7dda35e481ec1741c1afc44f4baefe24fd Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 21 Jul 2014 23:25:35 +0200 Subject: [PATCH] Error message when files can't be opened. --- .../studio/src/plugins/translation_manager/uxt_editor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/studio/src/plugins/translation_manager/uxt_editor.cpp b/code/studio/src/plugins/translation_manager/uxt_editor.cpp index b9548e0b5..99b0b200c 100644 --- a/code/studio/src/plugins/translation_manager/uxt_editor.cpp +++ b/code/studio/src/plugins/translation_manager/uxt_editor.cpp @@ -112,6 +112,9 @@ void UXTEditor::open( QString filename ) // The work file cannot be found, cannot proceed if( filename.endsWith( "wk.uxt" ) ) { + QMessageBox::critical( this, + tr( "Error opening file.." ), + tr( "There was an error opening wk.uxt" ) ); return; } @@ -125,7 +128,12 @@ void UXTEditor::open( QString filename ) // The work file cannot be found, cannot proceed STRING_MANAGER::loadStringFile( fn.toUtf8().constData(), infos, true ); if( d_ptr->infos.size() == 0 ) + { + QMessageBox::critical( this, + tr( "Error opening Uxt file" ), + tr( "Neither the specified file nor wk.uxt could be opened." ) ); return; + } d_ptr->loadedFromWK = true; }