Commits

Wei Cheng Pan committed 8e1ed4b

Recover client invocation.

Comments (0)

Files changed (1)

Krapture/server/src/Sikuli/SikuliClient.cpp

 			this->client->kill();
 			this->doSuccess = nullptr;
 			this->doFailure = nullptr;
-			
+
 			emit this->executed( true, "" );
 			return;
 		} else if( result == "failed" ) {
 			this->client->kill();
 			this->doSuccess = nullptr;
 			this->doFailure = nullptr;
-			
+
 			emit this->executed( false, data.value( "message" ).toString() );
 			return;
 		} else if( result == "input" ) {
 	// move cursor out to prevent some hover event
 	QCursor::setPos( 0, 0 );
 	this->client->setWorkingDirectory( this->clientWD );
-//	this->client->start( QString( "%1 %2" ).arg( this->clientPath ).arg( std::get< 1 >( bundle ) ) );
+	this->client->start( QString( "%1 %2" ).arg( this->clientPath ).arg( std::get< 1 >( bundle ) ) );
 	// TODO asynchronous if need
-//	this->client->waitForStarted();
+	this->client->waitForStarted();
 	// wait window manager animation finished
 	QEventLoop wait;
 	QTimer::singleShot( Setting::instance().get( "test_case_interval" ).toInt(), &wait, SLOT( quit() ) );
 
 	// TODO spawn by python?
 	this->p_->client->setWorkingDirectory( this->p_->clientWD );
-//	this->p_->client->start( QString( "%1 %2" ).arg( this->p_->clientPath ).arg( programOptions ) );
+	this->p_->client->start( QString( "%1 %2" ).arg( this->p_->clientPath ).arg( programOptions ) );
 	// TODO asynchronous if need
-//	this->p_->client->waitForStarted();
+	this->p_->client->waitForStarted();
 
 	this->p_->doSuccess = std::bind( &SikuliClient::Private::readExecute, this->p_ );
 	this->p_->doFailure = std::bind( &SikuliClient::Private::onActionTimeout, this->p_, QObject::tr( "execute command not responding" ) );