common/params: not copyable (#29834)

old-commit-hash: 7816edda57
This commit is contained in:
Dean Lee
2023-09-08 12:44:58 +08:00
committed by GitHub
parent bc6367bdf9
commit f48dc2b0ef
2 changed files with 5 additions and 2 deletions

View File

@@ -15,7 +15,11 @@ enum ParamKeyType {
class Params {
public:
Params(const std::string &path = {});
explicit Params(const std::string &path = {});
// Not copyable.
Params(const Params&) = delete;
Params& operator=(const Params&) = delete;
std::vector<std::string> allKeys() const;
bool checkKey(const std::string &key);
ParamKeyType getKeyType(const std::string &key);

View File

@@ -213,7 +213,6 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) {
ExperimentalButton::ExperimentalButton(QWidget *parent) : experimental_mode(false), engageable(false), QPushButton(parent) {
setFixedSize(btn_size, btn_size);
params = Params();
engage_img = loadPixmap("../assets/img_chffr_wheel.png", {img_size, img_size});
experimental_img = loadPixmap("../assets/img_experimental.svg", {img_size, img_size});
QObject::connect(this, &QPushButton::clicked, this, &ExperimentalButton::changeMode);