Example #1
0
void AvatarJobManager::scheduleJob()
{
	QMutexLocker(&mutex());

	if (!IsJobRunning && hasJob())
		// run it in next even cycle
		// this is for reccursion prevention, so we save on stack memory
		QTimer::singleShot(0, this, SLOT(runJob()));
}
Example #2
0
  CDDB::Result Submit::submit( CDInfo cdInfo, const TrackOffsetList& offsetList)
  {
    // If it was an inexact math from the server the discid might
    // be different, so recalculate it
    cdInfo.id = trackOffsetListToId(offsetList);

    makeDiskData( cdInfo, offsetList );

    if (!validCategory(cdInfo.category))
      return InvalidCategory;

    KIO::Job* job = createJob(cdInfo);

    if (!job)
      return UnknownError;

    return runJob(job);
  }