mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user