summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
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-07-20 15:54:19 +0000
commit28f5207ca08bed5c16474091a205bc8351574584 (patch)
tree28512396f684a5e57eaedf18614a0e08456f4b49 /src/corelib/plugin
parent826a83937da18616ca5358f66598ad991b7c2cee (diff)
QtCore: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c8d4b2920a11fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary_p.h2
-rw-r--r--src/corelib/plugin/quuid.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index 3965176ef7..ada90d7bfd 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -108,7 +108,7 @@ public:
raw += strlen("QTMETADATA ");
// the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
// but doesn't include the size of the header (8 bytes)
- QByteArray json(raw, qFromLittleEndian<uint>(*(uint *)(raw + 8)) + 8);
+ QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
return QJsonDocument::fromBinaryData(json);
}
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 72f662dc1e..812e2c9fb6 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -543,7 +543,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
QString QUuid::toString() const
{
QString result(38, Qt::Uninitialized);
- ushort *data = (ushort *)result.unicode();
+ ushort *data = (ushort *)result.data();
_q_uuidToHex(data, data1, data2, data3, data4);