System : Improved handling of missing files

This commit is contained in:
Magne Sjaastad 2016-11-24 10:51:20 +01:00
parent 2a7c6fdc4a
commit e0d7849576
2 changed files with 6 additions and 1 deletions

View File

@ -1964,6 +1964,8 @@ void RiaApplication::setLastUsedDialogDirectory(const QString& dialogName, const
//--------------------------------------------------------------------------------------------------
bool RiaApplication::openFile(const QString& fileName)
{
if (!QFile::exists(fileName)) return false;
bool loadingSucceded = false;
if (fileName.contains(".rsp", Qt::CaseInsensitive) || fileName.contains(".rip", Qt::CaseInsensitive))

View File

@ -21,8 +21,9 @@
#include "RiaApplication.h"
#include <QAction>
#include <QSettings>
#include <QFileInfo>
#include <QMessageBox>
#include <QSettings>
//--------------------------------------------------------------------------------------------------
@ -130,6 +131,8 @@ void RiuRecentFileActionProvider::slotOpenRecentFile()
}
else
{
QMessageBox::warning(NULL, "File open", "Failed to import file located at\n" + filename);
removeFileName(filename);
}
}