mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-15 21:57:59 +02:00
Fix prefetch state changes
This commit is contained in:
parent
eee487723c
commit
3f4f10a27e
2 changed files with 6 additions and 3 deletions
|
@ -139,17 +139,17 @@ void ScriptableResource::setInScript(bool isInScript) {
|
|||
}
|
||||
|
||||
void ScriptableResource::loadingChanged() {
|
||||
emit stateChanged(LOADING);
|
||||
setState(LOADING);
|
||||
}
|
||||
|
||||
void ScriptableResource::loadedChanged() {
|
||||
emit stateChanged(LOADED);
|
||||
setState(LOADED);
|
||||
}
|
||||
|
||||
void ScriptableResource::finished(bool success) {
|
||||
disconnectHelper();
|
||||
|
||||
emit stateChanged(success ? FINISHED : FAILED);
|
||||
setState(success ? FINISHED : FAILED);
|
||||
}
|
||||
|
||||
void ScriptableResource::disconnectHelper() {
|
||||
|
|
|
@ -113,6 +113,9 @@ signals:
|
|||
void progressChanged(uint64_t bytesReceived, uint64_t bytesTotal);
|
||||
void stateChanged(int state);
|
||||
|
||||
protected:
|
||||
void setState(State state) { _state = state; emit stateChanged(_state); }
|
||||
|
||||
private slots:
|
||||
void loadingChanged();
|
||||
void loadedChanged();
|
||||
|
|
Loading…
Reference in a new issue