void OptimisationTask::run(ThreadWeaver::JobPointer, ThreadWeaver::Thread*) { autoOptimiserPtoUrl = tmpDir.resolved(QUrl::fromLocalFile(QLatin1String("auto_op_pano.pto"))); QStringList args; args << QLatin1String("-am"); if (levelHorizon) args << QLatin1String("-l"); if (!buildGPano) args << QLatin1String("-s"); args << QLatin1String("-o"); args << autoOptimiserPtoUrl.toLocalFile(); args << ptoUrl.toLocalFile(); runProcess(args); // AutoOptimiser does not return an error code when something went wrong... QFile ptoOutput(autoOptimiserPtoUrl.toLocalFile()); if (!ptoOutput.exists()) { successFlag = false; errString = getProcessError(); } printDebug(QLatin1String("autooptimiser")); }
void CpFindTask::run(ThreadWeaver::JobPointer, ThreadWeaver::Thread*) { // Run CPFind to get control points and order the images cpFindPtoUrl = tmpDir; cpFindPtoUrl.setPath(cpFindPtoUrl.path() + QLatin1String("cp_pano.pto")); QStringList args; if (celeste) args << QLatin1String("--celeste"); args << QLatin1String("-o"); args << cpFindPtoUrl.toLocalFile(); args << ptoUrl.toLocalFile(); runProcess(args); // CPFind does not return an error code when something went wrong... QFile ptoOutput(cpFindPtoUrl.toLocalFile()); if (!ptoOutput.exists()) { successFlag = false; errString = getProcessError(); } printDebug(QLatin1String("cpfind")); }