@ -448,7 +448,7 @@ class Script: public QObject {
Q_OBJECT
Q_SIGNALS :
void logging ( QString ) ;
void progress ( QString , int , int ) ;
void progress ( QString , int , int , int ) ;
public :
typedef std : : pair < QString , QStringList > Signal ;
enum ClickType {
@ -640,8 +640,7 @@ class Script: public QObject {
int retries ( 0 ) , back ( 0 ) ;
for ( auto cmd ( _script . begin ( ) ) ; cmd ! = _script . end ( ) ;
_step + = ( * cmd ) - > steps ( this ) , + + cmd ) {
progress ( QString ( " %1:%2 " ) . arg ( ( * cmd ) - > file ( ) ) . arg ( ( * cmd ) - > line ( ) ) ,
_step , countSteps ( ) ) ;
progress ( ( * cmd ) - > file ( ) , ( * cmd ) - > line ( ) , _step , countSteps ( ) ) ;
xml : : Node testcase ( " testcase " ) ;
try {
testcase . attr ( " classname " ) =
@ -672,8 +671,7 @@ class Script: public QObject {
_testsuites - > last ( ) < < testcase ;
break ; // test is successfully finished
}
progress ( QString ( " %1:%2 " ) . arg ( ( * cmd ) - > file ( ) ) . arg ( ( * cmd ) - > line ( ) ) ,
_step , countSteps ( ) ) ;
progress ( ( * cmd ) - > file ( ) , ( * cmd ) - > line ( ) , _step , countSteps ( ) ) ;
} catch ( PossibleRetryLoad & e ) {
_timer . stop ( ) ;
// timeout may happen during load due to bad internet connection
@ -777,7 +775,7 @@ class Script: public QObject {
}
removeSignals ( frame ) ;
if ( ! _signals . empty ( ) ) error ( UnhandledSignals ( _signals ) ) ;
progress ( " success " , 0 , 0 ) ;
progress ( QString ( ) , 0 , 0 , 0 ) ;
return res ;
}
std : : shared_ptr < Command > command ( ) {
@ -1074,8 +1072,8 @@ class Script: public QObject {
_prototypes [ c - > tag ( ) ] = std : : shared_ptr < Command > ( c ) ;
}
private Q_SLOTS :
void innerProgress ( QString txt , int delta ) {
progress ( txt , _step + delta , countSteps ( ) ) ;
void innerProgress ( QString file , int line , int delta ) {
progress ( file , line , _step + delta , countSteps ( ) ) ;
}
void authenticationRequired ( QNetworkReply * , QAuthenticator * a ) {
if ( _auth . contains ( a - > realm ( ) ) ) {
@ -3211,13 +3209,13 @@ inline bool Command::runScript(Logger& log, Command* parentCommand,
try {
assert ( connect ( & scriptCopy , SIGNAL ( logging ( QString ) ) ,
parent , SLOT ( parentlog ( QString ) ) ) ) ;
assert ( connect ( & scriptCopy , SIGNAL ( progress ( QString , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int ) ) ) ) ;
assert ( connect ( & scriptCopy , SIGNAL ( progress ( QString , int , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int , int ) ) ) ) ;
parent - > removeSignals ( frame ) ;
bool res ( scriptCopy . run ( frame ) ) ;
parent - > addSignals ( frame ) ;
disconnect ( & scriptCopy , SIGNAL ( progress ( QString , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int ) ) ) ;
disconnect ( & scriptCopy , SIGNAL ( progress ( QString , int , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int , int ) ) ) ;
disconnect ( & scriptCopy , SIGNAL ( logging ( QString ) ) ,
parent , SLOT ( parentlog ( QString ) ) ) ;
parentCommand - > _result = scriptCopy . result ( ) ;
@ -3229,8 +3227,8 @@ inline bool Command::runScript(Logger& log, Command* parentCommand,
return res ;
} catch ( const Exception & x ) {
parent - > addSignals ( frame ) ;
disconnect ( & scriptCopy , SIGNAL ( progress ( QString , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int ) ) ) ;
disconnect ( & scriptCopy , SIGNAL ( progress ( QString , int , int , int ) ) ,
parent , SLOT ( innerProgress ( QString , int , int ) ) ) ;
disconnect ( & scriptCopy , SIGNAL ( logging ( QString ) ) ,
parent , SLOT ( parentlog ( QString ) ) ) ;
throw ;