From 4cfdcea1d13d8b4a3ce3e98b131f4c2b88f83aa7 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 28 Jul 2026 20:00:25 -0700 Subject: [PATCH] cabana: fix macOS build and --zmq bridge path (#38484) Two macOS-only cabana fixes: - signalview.h: rename the SignalView::setModel parameter that shadowed the `model` member. Newer clang (Apple clang 21) folds "parameter shadows a field" into plain -Wshadow, so with -Werror this breaks the macOS build. Older clang (CI's image) only flags it under -Wshadow-all, which is why CI stays green. The rename is clean under any -Wshadow level and gcc. - devicestream.cc: the --zmq bridge path had a stale `openpilot/` segment (`../../openpilot/cereal/messaging/bridge`), a monorepo-layout leftover that resolved to a non-existent triple-`openpilot` path, so the bridge failed to exec and live streaming was broken. Drop it to `../../cereal/messaging/bridge`. Co-authored-by: Claude Opus 4.8 (1M context) --- openpilot/tools/cabana/signalview.h | 8 ++++---- openpilot/tools/cabana/streams/devicestream.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openpilot/tools/cabana/signalview.h b/openpilot/tools/cabana/signalview.h index 2e44e55cbf..bccfbab0cc 100644 --- a/openpilot/tools/cabana/signalview.h +++ b/openpilot/tools/cabana/signalview.h @@ -129,11 +129,11 @@ private: // update widget geometries in QTreeView::rowsInserted QTreeView::rowsInserted(parent, start, end); } - void setModel(QAbstractItemModel *model) override { - QTreeView::setModel(model); + void setModel(QAbstractItemModel *m) override { + QTreeView::setModel(m); // Bypass the slow call to QTreeView::dataChanged. - QObject::disconnect(model, &QAbstractItemModel::dataChanged, this, nullptr); - QObject::connect(model, &QAbstractItemModel::dataChanged, this, + QObject::disconnect(m, &QAbstractItemModel::dataChanged, this, nullptr); + QObject::connect(m, &QAbstractItemModel::dataChanged, this, [this](const QModelIndex &tl, const QModelIndex &br, const auto &roles) { QAbstractItemView::dataChanged(tl, br, roles); }); } void leaveEvent(QEvent *event) override { diff --git a/openpilot/tools/cabana/streams/devicestream.cc b/openpilot/tools/cabana/streams/devicestream.cc index 91e890316e..3bd51c079d 100644 --- a/openpilot/tools/cabana/streams/devicestream.cc +++ b/openpilot/tools/cabana/streams/devicestream.cc @@ -53,7 +53,7 @@ void DeviceStream::start() { if (!zmq_address.isEmpty()) { stopBridge(); const std::string path = (std::filesystem::path(QCoreApplication::applicationDirPath().toStdString()) / - "../../openpilot/cereal/messaging/bridge").lexically_normal().string(); + "../../cereal/messaging/bridge").lexically_normal().string(); const std::string addr = zmq_address.toStdString(); const char *can_filter = "/\"can/\"";