Changed: Variables to debug infinite loops

This commit is contained in:
kervala 2016-10-03 10:01:30 +02:00
parent da57e300d7
commit 7b5b6c7841
2 changed files with 19 additions and 1 deletions

View file

@ -43,7 +43,8 @@
#define new DEBUG_NEW
#endif
COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(false), m_operation(OperationNone)
COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(false), m_operation(OperationNone),
m_operationStep(DisplayNoServerError), m_operationStepCounter(0)
{
setupUi(this);
@ -134,6 +135,21 @@ void COperationDialog::processInstallNextStep()
// long operations are done in a thread
OperationStep step = config->getInstallNextStep();
if (step == m_operationStep)
{
++m_operationStepCounter;
}
else
{
m_operationStep = step;
m_operationStepCounter = 0;
}
if (m_operationStepCounter > 10)
{
qDebug() << "possible infinite loop" << m_operationStep << m_operationStepCounter;
}
switch(step)
{
case DownloadData:

View file

@ -147,6 +147,8 @@ protected:
bool m_aborting;
OperationType m_operation;
OperationStep m_operationStep;
int m_operationStepCounter;
SComponents m_addComponents;
SComponents m_removeComponents;
QString m_currentServerId;