5#include <QtCore/QTimer>
19 using Action = std::function<bool()>;
30 int retryDelayMsecs = 1000,
56 void _executeAction();
61 int _retryDelayMsecs = 1000;
64 int _currentAttempt = 0;
65 bool _wasSkipped =
false;
QString stateName() const
int currentAttempt() const
void succeeded()
Emitted when the action eventually succeeds.
int totalAttempts() const
std::function< bool()> Action
void skipped()
Emitted when retries are exhausted and behavior is EmitAdvance.
void onEnter() override
Override to perform actions on state entry.
void exhausted()
Emitted when all retries are exhausted (both behaviors).
@ EmitAdvance
Emit advance() after retries exhausted (skip/continue).
@ EmitError
Emit error() after retries exhausted.
ExhaustedBehavior exhaustedBehavior() const
void retrying(int attempt, int maxAttempts)
Emitted before each retry attempt.