add warning message if recent file doesn't exists.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@1997 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
cfdev
2013-01-03 17:26:08 +00:00
parent 39c9d60dd1
commit 0b1d3a32c7
2 changed files with 11 additions and 0 deletions

View File

@@ -30,6 +30,8 @@
#include "qetresult.h"
#include "genericpanel.h"
#include <QMessageBox>
/**
constructeur
@param files Liste de fichiers a ouvrir
@@ -635,6 +637,10 @@ bool QETDiagramEditor::newProject() {
@see openAndAddDiagram
*/
bool QETDiagramEditor::openRecentFile(const QString &filepath) {
if (!QFile::exists ( filepath ))
QMessageBox::warning(this, tr("Attention"),
tr("Le fichier semble ne plus exister...")+"\n"+
tr("Fichier: ")+filepath+"\n");
if (qApp -> activeWindow() != this) return(false);
return(openAndAddProject(filepath));
}