mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 02:50:53 +00:00
Changed: Variables to debug infinite loops
This commit is contained in:
parent
da57e300d7
commit
7b5b6c7841
2 changed files with 19 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue