Commit 78ac56d6 authored by Victor Yacovlev's avatar Victor Yacovlev

FS#1254

parent 8b7d2ba4
...@@ -31,7 +31,7 @@ KumirProgram::KumirProgram(QObject *parent) ...@@ -31,7 +31,7 @@ KumirProgram::KumirProgram(QObject *parent)
, w_debuggerWindow(0) , w_debuggerWindow(0)
{ {
b_blind = false; b_blind = false;
courseManagerRequest_ = false;
a_regularRun = new QAction(tr("Regular run"), this); a_regularRun = new QAction(tr("Regular run"), this);
a_regularRun->setIcon(QIcon::fromTheme("media-playback-start", QIcon(QApplication::instance()->property("sharePath").toString()+"/icons/media-playback-start.png"))); a_regularRun->setIcon(QIcon::fromTheme("media-playback-start", QIcon(QApplication::instance()->property("sharePath").toString()+"/icons/media-playback-start.png")));
connect(a_regularRun, SIGNAL(triggered()), this, SLOT(regularRun())); connect(a_regularRun, SIGNAL(triggered()), this, SLOT(regularRun()));
...@@ -477,7 +477,7 @@ void KumirProgram::handleRunnerStopped(int rr) ...@@ -477,7 +477,7 @@ void KumirProgram::handleRunnerStopped(int rr)
typedef Shared::RunInterface RI; typedef Shared::RunInterface RI;
RI * runner = RI * runner =
ExtensionSystem::PluginManager::instance()->findPlugin<RI>(); ExtensionSystem::PluginManager::instance()->findPlugin<RI>();
if (courseManager && previousState == TestingRun) { if (courseManager && previousState == TestingRun && courseManagerRequest_) {
if (reason == Shared::RunInterface::SR_UserTerminated) { if (reason == Shared::RunInterface::SR_UserTerminated) {
courseManager->setTestingResult(CI::UserTerminated, 0); courseManager->setTestingResult(CI::UserTerminated, 0);
} }
......
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
void setBytecodeRun(KPlugin * run); void setBytecodeRun(KPlugin * run);
inline QString endStatus() const { return s_endStatus; } inline QString endStatus() const { return s_endStatus; }
inline void setCourseManagerRequest() { courseManagerRequest_ = true; }
~KumirProgram(); ~KumirProgram();
signals: signals:
void giveMeAProgram(); void giveMeAProgram();
...@@ -84,6 +85,8 @@ private: ...@@ -84,6 +85,8 @@ private:
QActionGroup * gr_actions; QActionGroup * gr_actions;
QString s_sourceFileName; QString s_sourceFileName;
bool courseManagerRequest_;
int documentId_; int documentId_;
bool b_blind; bool b_blind;
int i_timerId; int i_timerId;
......
...@@ -511,6 +511,7 @@ GuiInterface::ProgramSourceText Plugin::programSource() const ...@@ -511,6 +511,7 @@ GuiInterface::ProgramSourceText Plugin::programSource() const
void Plugin::startTesting() void Plugin::startTesting()
{ {
kumirProgram_->setCourseManagerRequest();
kumirProgram_->testingRun(); kumirProgram_->testingRun();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment