Update AssetRequest::State enum to use camelcase

This commit is contained in:
Ryan Huffman 2015-09-14 11:22:55 -07:00
parent 6468046c68
commit b8c1c279c6
3 changed files with 9 additions and 8 deletions

View file

@ -33,12 +33,12 @@ void AssetRequest::start() {
return; return;
} }
if (_state != NOT_STARTED) { if (_state != NotStarted) {
qCWarning(networking) << "AssetRequest already started."; qCWarning(networking) << "AssetRequest already started.";
return; return;
} }
_state = WAITING_FOR_INFO; _state = WaitingForInfo;
auto assetClient = DependencyManager::get<AssetClient>(); auto assetClient = DependencyManager::get<AssetClient>();
assetClient->getAssetInfo(_hash, _extension, [this](bool responseReceived, AssetServerError serverError, AssetInfo info) { assetClient->getAssetInfo(_hash, _extension, [this](bool responseReceived, AssetServerError serverError, AssetInfo info) {
@ -66,7 +66,7 @@ void AssetRequest::start() {
return; return;
} }
_state = WAITING_FOR_DATA; _state = WaitingForData;
_data.resize(info.size); _data.resize(info.size);
qCDebug(networking) << "Got size of " << _hash << " : " << info.size << " bytes"; qCDebug(networking) << "Got size of " << _hash << " : " << info.size << " bytes";

View file

@ -24,10 +24,10 @@ class AssetRequest : public QObject {
Q_OBJECT Q_OBJECT
public: public:
enum State { enum State {
NOT_STARTED = 0, NotStarted = 0,
WAITING_FOR_INFO, WaitingForInfo,
WAITING_FOR_DATA, WaitingForData,
FINISHED Finished
}; };
enum Error { enum Error {
@ -52,7 +52,7 @@ signals:
void progress(qint64 totalReceived, qint64 total); void progress(qint64 totalReceived, qint64 total);
private: private:
State _state = NOT_STARTED; State _state = NotStarted;
Error _error = NoError; Error _error = NoError;
AssetInfo _info; AssetInfo _info;
uint64_t _totalReceived { 0 }; uint64_t _totalReceived { 0 };

View file

@ -28,6 +28,7 @@ public:
enum Error { enum Error {
NoError = 0, NoError = 0,
NetworkError,
Timeout, Timeout,
TooLarge, TooLarge,
PermissionDenied, PermissionDenied,