Closed cecilianor closed 7 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.
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.
The network handling classes need some cleanup. Things to inspect and possibly refactor:
Network Controller:
std::optional<QByteArray> NetworkController::sendRequest(QString url)
signature and implementation so that errors are handled appropriately.Tile Loader:
std::pair<Data, ResultType>
. Functionality is considered 'critical' if the program exits, crashes or otherwise fails if the result of that function makes it so that the map can't be loaded to the software.downloadTile Lambda:
auto downloadTile = [&](TileCoord tile) -> VectorTile