do not try plugins to load if the file does not exist

This commit is contained in:
Sébastien Loriot 2012-08-01 05:19:40 +00:00
parent 48f8192d76
commit 6799a36fb0
1 changed files with 8 additions and 0 deletions

View File

@ -695,6 +695,14 @@ void MainWindow::open(QString filename)
}
#endif
if ( !fileinfo.exists() ){
QMessageBox::warning(this,
tr("Cannot open file"),
tr("File %1 does not exist.")
.arg(filename));
return;
}
//match all filters between ()
QRegExp all_filters_rx("\\((.*)\\)");