cecilianor / Qt-thesis

MIT License
9 stars 4 forks source link

Refactor Network Controller and Tile Loader Classes #47

Closed cecilianor closed 7 months ago

cecilianor commented 8 months ago

The network handling classes need some cleanup. Things to inspect and possibly refactor:

Network Controller:

Tile Loader:

downloadTile Lambda:

cecilianor commented 8 months ago

I just found a potential error in std::optional<QByteArray> NetworkController::sendRequest(QString url). This function can't have that type of signature since it handles different types of errors with the same error code. I will update the functionality to return a pair or tuple with data and errors.

cecilianor commented 7 months ago

I have set up the network controller as a private variable, and everything seems to work as intended. I'm going to make some general unit tests for the overall functionality. If everything passes, I will make a merge request on Monday.