Utils: Change prefix of global static variable names from m_ to s_

Change-Id: Ibf50f1e4db1791e6800b508f80fe1e0cc9d12ef7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2023-11-09 18:10:14 +01:00
parent 9c45399d14
commit 4b98bebb86

View File

@@ -37,10 +37,10 @@ static int range(float x, int min, int max)
namespace Utils { namespace Utils {
static StyleHelper::ToolbarStyle m_toolbarStyle = StyleHelper::defaultToolbarStyle; static StyleHelper::ToolbarStyle s_toolbarStyle = StyleHelper::defaultToolbarStyle;
// Invalid by default, setBaseColor needs to be called at least once // Invalid by default, setBaseColor needs to be called at least once
static QColor m_baseColor; static QColor s_baseColor;
static QColor m_requestedBaseColor; static QColor s_requestedBaseColor;
QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int factor) QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int factor)
{ {
@@ -81,17 +81,17 @@ QColor StyleHelper::toolBarDropShadowColor()
int StyleHelper::navigationWidgetHeight() int StyleHelper::navigationWidgetHeight()
{ {
return m_toolbarStyle == ToolbarStyleCompact ? 24 : 30; return s_toolbarStyle == ToolbarStyleCompact ? 24 : 30;
} }
void StyleHelper::setToolbarStyle(ToolbarStyle style) void StyleHelper::setToolbarStyle(ToolbarStyle style)
{ {
m_toolbarStyle = style; s_toolbarStyle = style;
} }
StyleHelper::ToolbarStyle StyleHelper::toolbarStyle() StyleHelper::ToolbarStyle StyleHelper::toolbarStyle()
{ {
return m_toolbarStyle; return s_toolbarStyle;
} }
qreal StyleHelper::sidebarFontSize() qreal StyleHelper::sidebarFontSize()
@@ -130,12 +130,12 @@ QColor StyleHelper::baseColor(bool lightColored)
static const QColor windowColor = QApplication::palette().color(QPalette::Window); static const QColor windowColor = QApplication::palette().color(QPalette::Window);
static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase); static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase);
return (lightColored || windowColorAsBase) ? windowColor : m_baseColor; return (lightColored || windowColorAsBase) ? windowColor : s_baseColor;
} }
QColor StyleHelper::requestedBaseColor() QColor StyleHelper::requestedBaseColor()
{ {
return m_requestedBaseColor; return s_requestedBaseColor;
} }
QColor StyleHelper::toolbarBaseColor(bool lightColored) QColor StyleHelper::toolbarBaseColor(bool lightColored)
@@ -196,7 +196,7 @@ QColor StyleHelper::buttonTextColor()
// from the users request. // from the users request.
void StyleHelper::setBaseColor(const QColor &newcolor) void StyleHelper::setBaseColor(const QColor &newcolor)
{ {
m_requestedBaseColor = newcolor; s_requestedBaseColor = newcolor;
const QColor themeBaseColor = creatorTheme()->color(Theme::PanelStatusBarBackgroundColor); const QColor themeBaseColor = creatorTheme()->color(Theme::PanelStatusBarBackgroundColor);
const QColor defaultBaseColor = QColor(DEFAULT_BASE_COLOR); const QColor defaultBaseColor = QColor(DEFAULT_BASE_COLOR);
@@ -213,8 +213,8 @@ void StyleHelper::setBaseColor(const QColor &newcolor)
value); value);
} }
if (color.isValid() && color != m_baseColor) { if (color.isValid() && color != s_baseColor) {
m_baseColor = color; s_baseColor = color;
const QWidgetList widgets = QApplication::allWidgets(); const QWidgetList widgets = QApplication::allWidgets();
for (QWidget *w : widgets) for (QWidget *w : widgets)
w->update(); w->update();