emailuis/nmailuiengine/src/nmoperation.cpp
changeset 40 2c62ef3caffd
parent 23 2dc6caa42ec3
child 30 759dc5235cdb
equal deleted inserted replaced
39:b0b89ca206b5 40:2c62ef3caffd
    52 /*!
    52 /*!
    53     \brief Adds a "preliminary operation" which needs to end until this operation can start.
    53     \brief Adds a "preliminary operation" which needs to end until this operation can start.
    54  */
    54  */
    55 void NmOperation::addPreliminaryOperation(NmOperation *operation)
    55 void NmOperation::addPreliminaryOperation(NmOperation *operation)
    56 {
    56 {
    57     connect(operation, SIGNAL(operationCompleted()), this,
    57     // if the preliminary operation is already completed
    58         SLOT(handlePreliminaryOperationFinished()));
    58     // the input parameter can be null
    59 
    59     if (operation && operation->isRunning()) {
    60     connect(operation, SIGNAL(operationCancelled()), this,
    60         connect(operation, SIGNAL(operationCompleted()), this,
    61         SLOT(handlePreliminaryOperationFinished()));
    61             SLOT(handlePreliminaryOperationFinished()));
    62 
    62     
    63     mPreliminaryOperations.append(operation);
    63         connect(operation, SIGNAL(operationCancelled()), this,
       
    64             SLOT(handlePreliminaryOperationFinished()));
       
    65     
       
    66         mPreliminaryOperations.append(operation);
       
    67     }
    64 }
    68 }
    65 
    69 
    66 /*!
    70 /*!
    67     \brief Slot, complete
    71     \brief Slot, complete
    68     The performer of the asynchronous function call should use this slot when
    72     The performer of the asynchronous function call should use this slot when