void PackageScanner::refresh() { emit progressMessage( tr( "Scanning for packages..." )); emit progressValue( 0 ); mScanner = new ScannerThread( this ); connect( mScanner, SIGNAL(finished()), this, SLOT(scannerDone()) ); connect( mScanner, SIGNAL(terminated()), this, SLOT(scannerDone()) ); mScanner->start(); }
void ReplayGain::createScanner(int index) { TrackScanner *s=new TrackScanner(index); s->setFile(files.at(index)); connect(s, SIGNAL(progress(int)), this, SLOT(scannerProgress(int))); connect(s, SIGNAL(done()), this, SLOT(scannerDone())); scanners.insert(index, s); JobController::self()->add(s); }