mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
Remove _didFinish from BakeAssetTask
This commit is contained in:
parent
50c47c785d
commit
239877fc18
2 changed files with 0 additions and 6 deletions
|
@ -78,7 +78,6 @@ void BakeAssetTask::run() {
|
||||||
if (_wasAborted) {
|
if (_wasAborted) {
|
||||||
emit bakeAborted(_assetHash, _assetPath);
|
emit bakeAborted(_assetHash, _assetPath);
|
||||||
} else {
|
} else {
|
||||||
_didFinish.store(true);
|
|
||||||
QString errors = "Fatal error occurred while baking";
|
QString errors = "Fatal error occurred while baking";
|
||||||
emit bakeFailed(_assetHash, _assetPath, errors);
|
emit bakeFailed(_assetHash, _assetPath, errors);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +89,6 @@ void BakeAssetTask::run() {
|
||||||
outputFiles.push_back(file.absoluteFilePath());
|
outputFiles.push_back(file.absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
_didFinish.store(true);
|
|
||||||
emit bakeComplete(_assetHash, _assetPath, tempOutputDir, outputFiles);
|
emit bakeComplete(_assetHash, _assetPath, tempOutputDir, outputFiles);
|
||||||
} else if (exitStatus == QProcess::NormalExit && exitCode == OVEN_STATUS_CODE_ABORT) {
|
} else if (exitStatus == QProcess::NormalExit && exitCode == OVEN_STATUS_CODE_ABORT) {
|
||||||
_wasAborted.store(true);
|
_wasAborted.store(true);
|
||||||
|
@ -98,7 +96,6 @@ void BakeAssetTask::run() {
|
||||||
} else {
|
} else {
|
||||||
QString errors;
|
QString errors;
|
||||||
if (exitCode == OVEN_STATUS_CODE_FAIL) {
|
if (exitCode == OVEN_STATUS_CODE_FAIL) {
|
||||||
_didFinish.store(true);
|
|
||||||
auto errorFilePath = _outputDir.absoluteFilePath("errors.txt");
|
auto errorFilePath = _outputDir.absoluteFilePath("errors.txt");
|
||||||
QFile errorFile { errorFilePath };
|
QFile errorFile { errorFilePath };
|
||||||
if (errorFile.open(QIODevice::ReadOnly)) {
|
if (errorFile.open(QIODevice::ReadOnly)) {
|
||||||
|
@ -116,7 +113,6 @@ void BakeAssetTask::run() {
|
||||||
qDebug() << "Starting oven for " << _assetPath;
|
qDebug() << "Starting oven for " << _assetPath;
|
||||||
_ovenProcess->start(path, args, QIODevice::ReadOnly);
|
_ovenProcess->start(path, args, QIODevice::ReadOnly);
|
||||||
if (!_ovenProcess->waitForStarted(-1)) {
|
if (!_ovenProcess->waitForStarted(-1)) {
|
||||||
_didFinish.store(true);
|
|
||||||
QString errors = "Oven process failed to start";
|
QString errors = "Oven process failed to start";
|
||||||
emit bakeFailed(_assetHash, _assetPath, errors);
|
emit bakeFailed(_assetHash, _assetPath, errors);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
|
|
||||||
void abort();
|
void abort();
|
||||||
bool wasAborted() const { return _wasAborted.load(); }
|
bool wasAborted() const { return _wasAborted.load(); }
|
||||||
bool didFinish() const { return _didFinish.load(); }
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void bakeComplete(QString assetHash, QString assetPath, QString tempOutputDir, QVector<QString> outputFiles);
|
void bakeComplete(QString assetHash, QString assetPath, QString tempOutputDir, QVector<QString> outputFiles);
|
||||||
|
@ -48,7 +47,6 @@ private:
|
||||||
QDir _outputDir;
|
QDir _outputDir;
|
||||||
std::unique_ptr<QProcess> _ovenProcess { nullptr };
|
std::unique_ptr<QProcess> _ovenProcess { nullptr };
|
||||||
std::atomic<bool> _wasAborted { false };
|
std::atomic<bool> _wasAborted { false };
|
||||||
std::atomic<bool> _didFinish { false };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_BakeAssetTask_h
|
#endif // hifi_BakeAssetTask_h
|
||||||
|
|
Loading…
Reference in a new issue