Adapt Qt.
This commit is contained in:
1 parent
6d95aa37e1
commit
fd72fa4451
2 files changed
+6
-6
No files matched your search
@@ -1539,15 +1539,15 @@ void MainWindow::addActivityObserver() {
|
||||
activitySource->set_activity_observer(this);
|
||||
}
|
||||
|
||||
void MainWindow::register_led(const std::string &name, uint8_t) {
|
||||
void MainWindow::register_led(const std::string_view name, uint8_t) {
|
||||
std::lock_guard guard(ledStatusesLock);
|
||||
ledStatuses[name] = false;
|
||||
ledStatuses[std::string(name)] = false;
|
||||
QMetaObject::invokeMethod(this, "updateStatusBarText");
|
||||
}
|
||||
|
||||
void MainWindow::set_led_status(const std::string &name, const bool isLit) {
|
||||
void MainWindow::set_led_status(const std::string_view name, const bool isLit) {
|
||||
std::lock_guard guard(ledStatusesLock);
|
||||
ledStatuses[name] = isLit;
|
||||
ledStatuses[std::string(name)] = isLit;
|
||||
QMetaObject::invokeMethod(this, "updateStatusBarText");
|
||||
}
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@ class MainWindow : public QMainWindow, public Outputs::Speaker::Speaker::Delegat
|
||||
|
||||
KeyboardMapper keyMapper;
|
||||
|
||||
void register_led(const std::string &, uint8_t) override;
|
||||
void set_led_status(const std::string &, bool) override;
|
||||
void register_led(std::string_view, uint8_t) override;
|
||||
void set_led_status(std::string_view, bool) override;
|
||||
|
||||
std::recursive_mutex ledStatusesLock;
|
||||
std::map<std::string, bool> ledStatuses;
|
||||
|
||||
Reference in new issue
Block a user