summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-05-04 15:38:13 +0200
committerThiago Macieira <thiago.macieira@intel.com>2020-05-07 13:23:36 +0000
commite106dfdd6b5fa118993ea8b7ff4baf00102806ca (patch)
tree94d1c298303b56711bfd7cdde1a07711a102157c /src/widgets/graphicsview
parent891b60bbc84ddde077072df3426539c716d47459 (diff)
Clean up some more mixed enum/int math
Add casts when necessary, and replace a bitwise trick with the proper function call. Pick-To: 5.15 Change-Id: I8b3109781af1e7fdc5d1c4c3fafe43394c81d71d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.h b/src/widgets/graphicsview/qgraphicslayout_p.h
index 9e86ae2f76..fa47eecf79 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.h
+++ b/src/widgets/graphicsview/qgraphicslayout_p.h
@@ -103,11 +103,11 @@ public:
inline void setDefaultSpacing(Qt::Orientation o, qreal spacing){
if (spacing >= 0)
- m_defaultSpacing[o - 1] = spacing;
+ m_defaultSpacing[int(o) - 1] = spacing;
}
inline qreal defaultSpacing(Qt::Orientation o) const {
- return m_defaultSpacing[o - 1];
+ return m_defaultSpacing[int(o) - 1];
}
inline qreal perItemSpacing(QSizePolicy::ControlType control1,