Quick GUI: Show error if root element is missing
This commit is contained in:
parent
c090141ec3
commit
b4750c38fe
|
@ -138,6 +138,10 @@ void Controller::load(const QString &filePath)
|
||||||
try {
|
try {
|
||||||
m_file.load();
|
m_file.load();
|
||||||
m_entryModel.setRootEntry(m_file.rootEntry());
|
m_entryModel.setRootEntry(m_file.rootEntry());
|
||||||
|
if (!m_entryModel.rootEntry()) {
|
||||||
|
emit fileError(tr("An error occured when opening the file: root element missing"), QStringLiteral("load"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
setFileOpen(true);
|
setFileOpen(true);
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
} catch (const CryptoException &e) {
|
} catch (const CryptoException &e) {
|
||||||
|
|
Loading…
Reference in New Issue