Skip to content

Commit

Permalink
Adding user controlled debugMode flag into config file
Browse files Browse the repository at this point in the history
  • Loading branch information
simsekgokhan committed Aug 4, 2020
1 parent b598062 commit 7a8b441
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/robomongo/core/settings/SettingsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ namespace Robomongo
_programExitedNormally = map.contains("programExitedNormally") ?
map.value("programExitedNormally").toBool() : true;

_disableHttpsFeatures = map.contains("disableHttpsFeatures") ? map.value("disableHttpsFeatures").toBool() : false;
_disableHttpsFeatures = map.contains("disableHttpsFeatures") ?
map.value("disableHttpsFeatures").toBool() : false;

_debugMode = map.contains("debugMode") ? map.value("debugMode").toBool() : false;

// 4. Load TimeZone
int timeZone = map.value("timeZone").toInt();
Expand Down Expand Up @@ -410,7 +413,8 @@ namespace Robomongo
map.insert("cacheData", _cacheData);
map.insert("programExitedNormally", _programExitedNormally);
map.insert("disableHttpsFeatures", _disableHttpsFeatures);

map.insert("debugMode", _debugMode);

return map;
}

Expand Down
4 changes: 3 additions & 1 deletion src/robomongo/core/settings/SettingsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ namespace Robomongo
bool programExitedNormally() const { return _programExitedNormally; }

// Designed to be set only by human users
bool disableHttpsFeatures() const { return _disableHttpsFeatures; }
bool disableHttpsFeatures() const { return _disableHttpsFeatures; }
bool debugMode() const { return _debugMode; }

/**
* Returns number of imported connections
Expand Down Expand Up @@ -249,6 +250,7 @@ namespace Robomongo
bool _disableConnectionShortcuts;
bool _programExitedNormally = true;
bool _disableHttpsFeatures = false;
bool _debugMode = false;
QSet<QString> _acceptedEulaVersions;
QSet<QString> _dbVersionsConnected;
int _batchSize;
Expand Down

0 comments on commit 7a8b441

Please sign in to comment.