Changed: Variables to debug infinite loops
--HG-- branch : develop
This commit is contained in:
parent
c0d4013b51
commit
ca9ccf5fbf
2 changed files with 19 additions and 1 deletions
|
@ -43,7 +43,8 @@
|
||||||
#define new DEBUG_NEW
|
#define new DEBUG_NEW
|
||||||
#endif
|
#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);
|
setupUi(this);
|
||||||
|
|
||||||
|
@ -134,6 +135,21 @@ void COperationDialog::processInstallNextStep()
|
||||||
// long operations are done in a thread
|
// long operations are done in a thread
|
||||||
OperationStep step = config->getInstallNextStep();
|
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)
|
switch(step)
|
||||||
{
|
{
|
||||||
case DownloadData:
|
case DownloadData:
|
||||||
|
|
|
@ -147,6 +147,8 @@ protected:
|
||||||
bool m_aborting;
|
bool m_aborting;
|
||||||
|
|
||||||
OperationType m_operation;
|
OperationType m_operation;
|
||||||
|
OperationStep m_operationStep;
|
||||||
|
int m_operationStepCounter;
|
||||||
SComponents m_addComponents;
|
SComponents m_addComponents;
|
||||||
SComponents m_removeComponents;
|
SComponents m_removeComponents;
|
||||||
QString m_currentServerId;
|
QString m_currentServerId;
|
||||||
|
|
Loading…
Reference in a new issue