mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-27 23:35:26 +00:00
30 lines
502 B
C++
30 lines
502 B
C++
|
#include "Cutter.h"
|
||
|
#include "RunScriptTask.h"
|
||
|
#include "MainWindow.h"
|
||
|
|
||
|
RunScriptTask::RunScriptTask() :
|
||
|
AsyncTask()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
RunScriptTask::~RunScriptTask()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void RunScriptTask::interrupt()
|
||
|
{
|
||
|
AsyncTask::interrupt();
|
||
|
r_cons_singleton()->context->breaked = true;
|
||
|
}
|
||
|
|
||
|
void RunScriptTask::runTask()
|
||
|
{
|
||
|
if (!this->fileName.isNull()) {
|
||
|
log(tr("Executing script..."));
|
||
|
Core()->cmdTask(". " + this->fileName);
|
||
|
if (isInterrupted()) {
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
}
|