本文整理汇总了C++中actiontools::ActionInstance::exceptionActionInstances方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionInstance::exceptionActionInstances方法的具体用法?C++ ActionInstance::exceptionActionInstances怎么用?C++ ActionInstance::exceptionActionInstances使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actiontools::ActionInstance
的用法示例。
在下文中一共展示了ActionInstance::exceptionActionInstances方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: executeCurrentAction
void Executer::executeCurrentAction()
{
//Skip disabled actions
if(mCurrentActionIndex >= 0)
{
while(mCurrentActionIndex < mScript->actionCount() && canExecuteAction(mCurrentActionIndex) != CanExecute)
++mCurrentActionIndex;
}
if(mCurrentActionIndex < 0 || mCurrentActionIndex >= mScript->actionCount())
{
stopExecution();
return;
}
int nextLine = mCurrentActionIndex + 2;
if(nextLine > mScript->actionCount())
nextLine = -1;
QScriptValue script = mScriptEngine->globalObject().property("Script");
script.setProperty("nextLine", mScriptEngine->newVariant(QVariant(nextLine)));
script.setProperty("line", mCurrentActionIndex + 1, QScriptValue::ReadOnly);
ActionTools::ActionInstance *actionInstance = currentActionInstance();
const ActionTools::ExceptionActionInstancesHash &exceptionActionInstancesHash = actionInstance->exceptionActionInstances();
const ActionTools::ActionException::ExceptionActionInstance &exceptionAction = exceptionActionInstancesHash.value(ActionTools::ActionException::CodeErrorException);
mShowDebuggerOnCodeError = (exceptionAction.action() == ActionTools::ActionException::StopExecutionExceptionAction);
mExecutionWindow->setCurrentActionName(actionInstance->definition()->name());
mExecutionWindow->setCurrentActionColor(actionInstance->color());
connect(actionInstance, SIGNAL(executionEnded()), this, SLOT(actionExecutionEnded()));
connect(actionInstance, SIGNAL(executionException(int,QString)), this, SLOT(executionException(int,QString)));
connect(actionInstance, SIGNAL(disableAction(bool)), this, SLOT(disableAction(bool)));
connect(actionInstance, SIGNAL(showProgressDialog(QString,int)), this, SLOT(showProgressDialog(QString,int)));
connect(actionInstance, SIGNAL(updateProgressDialog(int)), this, SLOT(updateProgressDialog(int)));
connect(actionInstance, SIGNAL(updateProgressDialog(QString)), this, SLOT(updateProgressDialog(QString)));
connect(actionInstance, SIGNAL(hideProgressDialog()), this, SLOT(hideProgressDialog()));
connect(actionInstance, SIGNAL(consolePrint(QString)), this, SLOT(consolePrint(QString)));
connect(actionInstance, SIGNAL(consolePrintWarning(QString)), this, SLOT(consolePrintWarning(QString)));
connect(actionInstance, SIGNAL(consolePrintError(QString)), this, SLOT(consolePrintError(QString)));
mExecutionStatus = PrePause;
mExecutionTimer.start();
mExecutionTime.start();
if(currentActionInstance()->pauseBefore() + mPauseBefore > 0)
{
mExecutionWindow->setProgressEnabled(true);
mExecutionWindow->setProgressMinimum(0);
mExecutionWindow->setProgressMaximum(currentActionInstance()->pauseBefore() + mPauseBefore);
mExecutionWindow->setProgressValue(0);
}
else
mExecutionWindow->setProgressEnabled(false);
mExecutionEnded = true;
}