summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 22:25:45 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-17 01:26:00 +0000
commit4cdff7a0ea95a881bba859157e6eb847f6c10dc5 (patch)
treed6eeffb4d847e1e0c9eee2d26e0713c985d979c4 /src/widgets/styles/qstylesheetstyle.cpp
parent4da46bbb9a1b97759f3552c58e1b6d48e290e8ef (diff)
QtWidgets: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94684f8498f21 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 014333700a..4993457b32 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1478,7 +1478,7 @@ public:
do {
const ushort *uc = (const ushort *)nodeName.constData();
const ushort *e = uc + nodeName.length();
- const uchar *c = (uchar *)metaObject->className();
+ const uchar *c = (const uchar *)metaObject->className();
while (*c && uc != e && (*uc == *c || (*c == ':' && *uc == '-'))) {
++uc;
++c;
@@ -1579,7 +1579,7 @@ QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QObject *obj) const
styleSelector.styleSheets += objectSs;
StyleSelector::NodePtr n;
- n.ptr = (void *)obj;
+ n.ptr = const_cast<QObject *>(obj);
QVector<QCss::StyleRule> rules = styleSelector.styleRulesForNode(n);
styleSheetCaches->styleRulesCache.insert(obj, rules);
return rules;