Reimplement default configuration

Now it uses real default values without having to set all the
    initial values.
    I a value is not found it will use the default one.
This commit is contained in:
lupoDharkael
2018-01-09 19:45:07 +01:00
parent c726e06d3b
commit 248c446dec
6 changed files with 54 additions and 52 deletions

View File

@@ -38,8 +38,6 @@ Controller::Controller() : m_captureWindow(nullptr)
{
qApp->setQuitOnLastWindowClosed(false);
initDefaults();
// init tray icon
#if defined(Q_OS_LINUX)
if (!ConfigHandler().disabledTrayIconValue()) {
@@ -63,16 +61,6 @@ Controller *Controller::getInstance() {
return &c;
}
// initDefaults inits the global config in the first execution of the program
void Controller::initDefaults() {
ConfigHandler config;
//config.setNotInitiated();
if (!config.initiatedIsSet()) {
config.setDefaults();
config.setInitiated();
}
}
// creation of a new capture in GUI mode
void Controller::createVisualCapture(const uint id, const QString &forcedSavePath) {
if (!m_captureWindow) {