commit d8a7d6a3f248523d744c4d066befdf166ab85d20
Author: Koji Yokota <[email protected]>
Date: Tue Sep 2 21:16:31 2025 +0900
Mark getter functions as const in PrefColors
---
src/frontends/qt/GuiPrefs.cpp | 6 +++---
src/frontends/qt/GuiPrefs.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 8dfbaf4b25..f055a65078 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1929,14 +1929,14 @@ void PrefColors::initializeColorsTV()
}
-QColor PrefColors::getCurrentColor(ColorCode color_code, bool is_dark_mode)
const
+QColor PrefColors::getCurrentColor(ColorCode color_code, bool const
is_dark_mode) const
{
return lcolor.getX11HexName(color_code, is_dark_mode).c_str();
}
QColor PrefColors::getCurrentThemeColor(int const &row,
- bool const &is_dark_color)
+ bool const &is_dark_color) const
{
QColor color;
@@ -1950,7 +1950,7 @@ QColor PrefColors::getCurrentThemeColor(int const &row,
}
-ColorPair PrefColors::getCurrentThemeColors(int const &row)
+ColorPair PrefColors::getCurrentThemeColors(int const &row) const
{
return theme_colors_[row];
}
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index d0a5be15ba..4dc44d64ec 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -266,7 +266,7 @@ public:
void applyRC(LyXRC & rc) const override;
void updateRC(LyXRC const & rc) override;
- QColor getCurrentColor(ColorCode color_code, bool is_dark_mode) const;
+ QColor getCurrentColor(ColorCode color_code, bool const is_dark_mode)
const;
private Q_SLOTS:
void onColorsTVClicked(const QModelIndex index);
@@ -316,9 +316,9 @@ private:
void setEditButtonStatus();
/// Get default color of current theme at (row, column) in the colorsTV.
/// If theme_colors_ is empty, this returns an invalid QColor.
- QColor getCurrentThemeColor(int const &row, bool const &is_dark_color);
+ QColor getCurrentThemeColor(int const &row, bool const &is_dark_color)
const;
///
- ColorPair getCurrentThemeColors(int const &row);
+ ColorPair getCurrentThemeColors(int const &row) const;
/// Find a theme name of the current color set and indicates it in
themesLW
/// if there is a match.
void findThemeFromColorSet();
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs