mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 16:53:08 +02:00
Context: No longer calls Context methods while dtor is running.
This commit is contained in:
parent
3708f852c2
commit
e2f504e686
3 changed files with 8 additions and 2 deletions
|
@ -622,7 +622,7 @@ void Context::getLimits (int& rows, int& lines)
|
||||||
void Context::staticInitialization ()
|
void Context::staticInitialization ()
|
||||||
{
|
{
|
||||||
CLI2::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
CLI2::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
||||||
Lexer::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
Lexer::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
||||||
|
|
||||||
Task::defaultProject = config.get ("default.project");
|
Task::defaultProject = config.get ("default.project");
|
||||||
Task::defaultDue = config.get ("default.due");
|
Task::defaultDue = config.get ("default.due");
|
||||||
|
@ -632,6 +632,8 @@ void Context::staticInitialization ()
|
||||||
Lexer::dateFormat = Variant::dateFormat = config.get ("dateformat");
|
Lexer::dateFormat = Variant::dateFormat = config.get ("dateformat");
|
||||||
Lexer::isoEnabled = Variant::isoEnabled = config.getBoolean ("date.iso");
|
Lexer::isoEnabled = Variant::isoEnabled = config.getBoolean ("date.iso");
|
||||||
|
|
||||||
|
TDB2::debug_mode = config.getBoolean ("debug");
|
||||||
|
|
||||||
for (auto& rc : config)
|
for (auto& rc : config)
|
||||||
{
|
{
|
||||||
if (rc.first.substr (0, 4) == "uda." &&
|
if (rc.first.substr (0, 4) == "uda." &&
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
|
||||||
|
bool TDB2::debug_mode = false;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
TF2::TF2 ()
|
TF2::TF2 ()
|
||||||
: _read_only (false)
|
: _read_only (false)
|
||||||
|
@ -57,7 +59,7 @@ TF2::TF2 ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
TF2::~TF2 ()
|
TF2::~TF2 ()
|
||||||
{
|
{
|
||||||
if (_dirty && context.verbose ("debug"))
|
if (_dirty && TDB2::debug_mode)
|
||||||
std::cout << format (STRING_TDB2_DIRTY_EXIT, std::string (_file))
|
std::cout << format (STRING_TDB2_DIRTY_EXIT, std::string (_file))
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,8 @@ private:
|
||||||
class TDB2
|
class TDB2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static bool debug_mode;
|
||||||
|
|
||||||
TDB2 ();
|
TDB2 ();
|
||||||
~TDB2 ();
|
~TDB2 ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue