summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 22:25:45 -0800
committerShawn Rutledge <shawn.rutledge@digia.com>2015-03-09 13:21:38 +0000
commitafe3e247110dcb790aac1a34f13aa4fe8d5f78c0 (patch)
treea82c02f198e01e1f1f49e0102fdc4aaefa8634fd /src/plugins/platforms
parent3d7a0111e3d72b39c3e5f04ca9d634ed9c151cba (diff)
QPA plugins: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946899b4ba15b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index d4f1c6ae48..2c0a7a11cc 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -97,7 +97,7 @@ protected:
that->format_atoms = m_clipboard->getDataInFormat(modeAtom, m_clipboard->atom(QXcbAtom::TARGETS));
if (format_atoms.size() > 0) {
- xcb_atom_t *targets = (xcb_atom_t *) format_atoms.data();
+ const xcb_atom_t *targets = (const xcb_atom_t *) format_atoms.data();
int size = format_atoms.size() / sizeof(xcb_atom_t);
for (int i = 0; i < size; ++i) {
@@ -128,7 +128,7 @@ protected:
(void)formats(); // trigger update of format list
QVector<xcb_atom_t> atoms;
- xcb_atom_t *targets = (xcb_atom_t *) format_atoms.data();
+ const xcb_atom_t *targets = (const xcb_atom_t *) format_atoms.data();
int size = format_atoms.size() / sizeof(xcb_atom_t);
atoms.reserve(size);
for (int i = 0; i < size; ++i)
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 78ced43af8..08108f1e20 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -703,7 +703,7 @@ Q_XCB_EXPORT QDebug operator<<(QDebug debug, const QXcbScreen *screen)
{
const QDebugStateSaver saver(debug);
debug.nospace();
- debug << "QXcbScreen(" << (void *)screen;
+ debug << "QXcbScreen(" << (const void *)screen;
if (screen) {
debug << fixed << qSetRealNumberPrecision(1);
debug << ", name=" << screen->name();
diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.cpp b/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
index 33e67a14b1..328b72234a 100644
--- a/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
+++ b/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
@@ -125,7 +125,7 @@ static void sm_setProperty(const QString &name, const QString &value)
QByteArray v = value.toUtf8();
SmPropValue prop;
prop.length = v.length();
- prop.value = (SmPointer) v.constData();
+ prop.value = (SmPointer) const_cast<char *>(v.constData());
sm_setProperty(name.toLatin1().data(), SmARRAY8, 1, &prop);
}