print/show config format execption
This commit is contained in:
parent
ee936541c6
commit
84ef555774
15
window.cpp
15
window.cpp
@ -23,6 +23,7 @@
|
||||
#include <QHeaderView>
|
||||
#include <QDesktopServices>
|
||||
#include <QFileIconProvider>
|
||||
#include <QDebug>
|
||||
#include <QMenu>
|
||||
#include <QClipboard>
|
||||
#include "window.h"
|
||||
@ -56,8 +57,18 @@ Window::~Window()
|
||||
|
||||
void Window::initFromConfig()
|
||||
{
|
||||
this->userEntryButtons = generateEntryButtons(configProvider->getUserEntries());
|
||||
this->systemEntryButtons = generateEntryButtons(configProvider->getSystemEntries());
|
||||
try
|
||||
{
|
||||
this->userEntryButtons = generateEntryButtons(configProvider->getUserEntries());
|
||||
this->systemEntryButtons = generateEntryButtons(configProvider->getSystemEntries());
|
||||
}
|
||||
catch(const ConfigFormatException &e)
|
||||
{
|
||||
qDebug() << "Config is misformated: " << e.what();
|
||||
QMessageBox::critical(this, "Misformated config file", e.what());
|
||||
qApp->quit();
|
||||
}
|
||||
|
||||
populateGrid(this->userEntryButtons);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user