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

@@ -40,6 +40,7 @@
#include "texteditor.h"
#include "textfieldeditor.h"
#include <QMessageBox>
/*
Nombre maximum de primitives affichees par la "liste des parties"
Au-dela, un petit message est affiche, indiquant que ce nombre a ete depasse
@@ -914,6 +915,10 @@ void QETElementEditor::slot_openFile() {
@see openElement
*/
void QETElementEditor::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;
openElement(filepath);
}

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));
}