input-rec: Display message when we fail to create/open file

This commit is contained in:
TheLastRar authored and Connor McLaughlin committed 2024-06-09 21:03:23 +10:00
1 parent a95288946c
commit 7878dee32d
2 files changed
+18 -1

No files matched your search

@@ -7,6 +7,7 @@
#include <QtCore/QDir>
#include <QtCore/QString>
#include <QtWidgets/QDialog>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/qfiledialog.h>
// TODO - for now this uses a very naive implementation that fills the entire table
@@ -96,7 +97,11 @@ void InputRecordingViewer::openFile()
if (m_file_open)
{
loadTable();
} // TODO else error
}
else
{
QMessageBox::critical(this, tr("Opening Recording Failed"), tr("Failed to open file: %1").arg(QString::fromUtf8(fileName.c_str())));
}
}
}