Revert "Update routes.cc"

This reverts commit 21935c2431.
This commit is contained in:
royjr
2026-03-09 20:33:45 -04:00
parent 21935c2431
commit 7261faef70
+2 -6
View File
@@ -74,9 +74,7 @@ RoutesDialog::RoutesDialog(QWidget *parent) : QDialog(parent) {
QPointer<RoutesDialog> self = this;
QtConcurrent::run([self]() {
std::string result = PyDownloader::getDevices();
auto response = checkApiResponse(result);
bool success = response.first;
int error_code = response.second;
auto [success, error_code] = checkApiResponse(result);
QMetaObject::invokeMethod(qApp, [self, r = QString::fromStdString(result), success, error_code]() {
if (self) self->parseDeviceList(r, success, error_code);
}, Qt::QueuedConnection);
@@ -119,9 +117,7 @@ void RoutesDialog::fetchRoutes() {
QtConcurrent::run([self, did, start_ms, end_ms, preserved, request_id]() {
std::string result = PyDownloader::getDeviceRoutes(did, start_ms, end_ms, preserved);
if (!self || self->fetch_id_ != request_id) return;
auto response = checkApiResponse(result);
bool success = response.first;
int error_code = response.second;
auto [success, error_code] = checkApiResponse(result);
QMetaObject::invokeMethod(qApp, [self, r = QString::fromStdString(result), success, error_code, request_id]() {
if (self && self->fetch_id_ == request_id) self->parseRouteList(r, success, error_code);
}, Qt::QueuedConnection);