mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-07 17:44:01 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user