rem: Script* s = new Script();
context: int runscripts( const QString &interpreter, const QString &extension, const QString &path ){  int rval = 0;  Script* s = new Script();  QStringList files;  QDir dir( path );  dir.setNameFilter( extension );  dir.setFilter( QDir::Files );  dir.setSorting( QDir::Name | QDir::IgnoreCase );  const QFileInfoList *list = dir.entryInfoList();  QFileInfoListIterator it( *list );  QFileInfo *fi;  while ( !rval && ( fi = it.current() ) != 0 )   {    // Don't run scripts that are shared routines.    if ( ! fi->fileName().startsWith( "__" ) )     {      kdDebug() << "runscripts: running " << fi->fileName() << endl;      s->addArgument( interpreter );      s->addArgument( path + QDir::separator() + fi->fileName().latin1() );      // Thorsten's xautomation tests run with user interaction by default.      if ( interpreter == "sh" ) s->addArgument( "--batch" );      if ( interpreter == "php" ) s->addArgument( "--batch" );      rval = s->run();      delete s;      s = new Script();    }    ++it;  }  delete s;  s = 0;    return rval;}