From 4683c22663b34ecb3f1a791937ead7a7bc449fa8 Mon Sep 17 00:00:00 2001 From: rettinghaus Date: Thu, 9 Jan 2025 16:57:38 +0100 Subject: [PATCH 1/2] make is* methods const --- src/engraving/dom/editdata.h | 2 +- src/engraving/dom/tempotext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engraving/dom/editdata.h b/src/engraving/dom/editdata.h index cc57d00acaddb..28466095a53c2 100644 --- a/src/engraving/dom/editdata.h +++ b/src/engraving/dom/editdata.h @@ -270,7 +270,7 @@ class EditData void addData(std::shared_ptr); bool control(bool textEditing = false) const; bool shift() const { return modifiers & ShiftModifier; } - bool isStartEndGrip() { return curGrip == Grip::START || curGrip == Grip::END; } + bool isStartEndGrip() const { return curGrip == Grip::START || curGrip == Grip::END; } bool hasCurrentGrip() { return curGrip != Grip::NO_GRIP; } private: diff --git a/src/engraving/dom/tempotext.h b/src/engraving/dom/tempotext.h index d022f7bde11b6..8c2a1cc94d730 100644 --- a/src/engraving/dom/tempotext.h +++ b/src/engraving/dom/tempotext.h @@ -61,7 +61,7 @@ class TempoText final : public TextBase BeatsPerSecond tempo() const { return m_tempo; } double tempoBpm() const; void setTempo(BeatsPerSecond v); - bool isRelative() { return m_isRelative; } + bool isRelative() const { return m_isRelative; } void setRelative(double v) { m_isRelative = true; m_relative = v; } bool isNormal() const { return m_tempoTextType == TempoTextType::NORMAL; } From ac9871310d73d85f5ad3cd6812a33e1cd5b26ffc Mon Sep 17 00:00:00 2001 From: rettinghaus Date: Fri, 10 Jan 2025 16:06:13 +0100 Subject: [PATCH 2/2] make more methods const --- src/engraving/dom/editdata.h | 2 +- src/notation/view/widgets/timeline.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engraving/dom/editdata.h b/src/engraving/dom/editdata.h index 28466095a53c2..d2e45ab6b8ec4 100644 --- a/src/engraving/dom/editdata.h +++ b/src/engraving/dom/editdata.h @@ -271,7 +271,7 @@ class EditData bool control(bool textEditing = false) const; bool shift() const { return modifiers & ShiftModifier; } bool isStartEndGrip() const { return curGrip == Grip::START || curGrip == Grip::END; } - bool hasCurrentGrip() { return curGrip != Grip::NO_GRIP; } + bool hasCurrentGrip() const { return curGrip != Grip::NO_GRIP; } private: std::list > m_data; diff --git a/src/notation/view/widgets/timeline.h b/src/notation/view/widgets/timeline.h index 7dce351630d57..2c05b66fbe0eb 100644 --- a/src/notation/view/widgets/timeline.h +++ b/src/notation/view/widgets/timeline.h @@ -262,7 +262,7 @@ private slots: unsigned nmetas() const; - bool collapsed() { return _collapsedMeta; } + bool collapsed() const { return _collapsedMeta; } void setCollapsed(bool st) { _collapsedMeta = st; } engraving::Staff* numToStaff(int staff);