@@ -28,7 +28,8 @@ EngineConfiguration::EngineConfiguration()
2828 m_pondering(false ),
2929 m_validateClaims(true ),
3030 m_timeoutScale(1.0 ),
31- m_restartMode(RestartAuto)
31+ m_restartMode(RestartAuto),
32+ m_debugEnabled(false )
3233{
3334}
3435
@@ -43,7 +44,8 @@ EngineConfiguration::EngineConfiguration(const QString& name,
4344 m_pondering(false ),
4445 m_validateClaims(true ),
4546 m_timeoutScale(1.0 ),
46- m_restartMode(RestartAuto)
47+ m_restartMode(RestartAuto),
48+ m_debugEnabled(false )
4749{
4850}
4951
@@ -53,7 +55,8 @@ EngineConfiguration::EngineConfiguration(const QVariant& variant)
5355 m_pondering(false ),
5456 m_validateClaims(true ),
5557 m_timeoutScale(1.0 ),
56- m_restartMode(RestartAuto)
58+ m_restartMode(RestartAuto),
59+ m_debugEnabled(false )
5760{
5861 const QVariantMap map = variant.toMap ();
5962
@@ -90,6 +93,8 @@ EngineConfiguration::EngineConfiguration(const QVariant& variant)
9093
9194 if (map.contains (" validateClaims" ))
9295 setClaimsValidated (map[" validateClaims" ].toBool ());
96+ if (map.contains (" debug" ))
97+ setDebugEnabled (map[" debug" ].toBool ());
9398
9499 if (map.contains (" variants" ))
95100 setSupportedVariants (map[" variants" ].toStringList ());
@@ -120,7 +125,8 @@ EngineConfiguration::EngineConfiguration(const EngineConfiguration& other)
120125 m_pondering(other.m_pondering),
121126 m_validateClaims(other.m_validateClaims),
122127 m_timeoutScale(other.m_timeoutScale),
123- m_restartMode(other.m_restartMode)
128+ m_restartMode(other.m_restartMode),
129+ m_debugEnabled(other.debugEnabled())
124130{
125131 const auto options = other.options ();
126132 for (const EngineOption* option : options)
@@ -146,6 +152,7 @@ EngineConfiguration& EngineConfiguration::operator=(EngineConfiguration&& other)
146152 m_validateClaims = other.m_validateClaims ;
147153 m_timeoutScale = other.m_timeoutScale ;
148154 m_restartMode = other.m_restartMode ;
155+ m_debugEnabled =other.m_debugEnabled ;
149156 m_options = other.m_options ;
150157
151158 // other's destructor will cause a mess if its m_options isn't cleared
@@ -183,6 +190,8 @@ QVariant EngineConfiguration::toVariant() const
183190
184191 if (!m_validateClaims)
185192 map.insert (" validateClaims" , false );
193+ if (m_debugEnabled)
194+ map.insert (" debug" , true );
186195
187196 if (m_variants.count (" standard" ) != m_variants.count ())
188197 map.insert (" variants" , m_variants);
@@ -384,6 +393,16 @@ void EngineConfiguration::setTimeoutScale(double value)
384393 m_timeoutScale = qBound (timeoutScaleMin, value, timeoutScaleMax);
385394}
386395
396+ bool EngineConfiguration::debugEnabled () const
397+ {
398+ return m_debugEnabled;
399+ }
400+
401+ void EngineConfiguration::setDebugEnabled (bool enabled)
402+ {
403+ m_debugEnabled = enabled;
404+ }
405+
387406EngineConfiguration& EngineConfiguration::operator =(const EngineConfiguration& other)
388407{
389408 if (this != &other)
@@ -401,6 +420,7 @@ EngineConfiguration& EngineConfiguration::operator=(const EngineConfiguration& o
401420 m_pondering = other.m_pondering ;
402421 m_validateClaims = other.m_validateClaims ;
403422 m_restartMode = other.m_restartMode ;
423+ m_debugEnabled = other.m_debugEnabled ;
404424
405425 qDeleteAll (m_options);
406426 m_options.clear ();
0 commit comments