summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qstringbuilder.h4
-rw-r--r--src/testlib/qtestcoreelement.h2
-rw-r--r--src/testlib/qtestfilelogger.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index 3b43253..463c32d 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -163,7 +163,7 @@ template <> struct QConcatenable<QString>
static inline void appendTo(const QString &a, QChar *&out)
{
const int n = a.size();
- memcpy(out, (char*)a.constData(), sizeof(QChar) * n);
+ memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
out += n;
}
};
@@ -175,7 +175,7 @@ template <> struct QConcatenable<QStringRef>
static inline void appendTo(QStringRef a, QChar *&out)
{
const int n = a.size();
- memcpy(out, (char*)a.constData(), sizeof(QChar) * n);
+ memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
out += n;
}
};
diff --git a/src/testlib/qtestcoreelement.h b/src/testlib/qtestcoreelement.h
index a6aa56d..8c029b5 100644
--- a/src/testlib/qtestcoreelement.h
+++ b/src/testlib/qtestcoreelement.h
@@ -74,7 +74,7 @@ class QTestCoreElement: public QTestCoreList<ElementType>
template<class ElementType>
QTestCoreElement<ElementType>::QTestCoreElement(int t)
-:listOfAttributes(0), type((QTest::LogElementType)t)
+ :listOfAttributes(0), type(QTest::LogElementType(t))
{
}
diff --git a/src/testlib/qtestfilelogger.cpp b/src/testlib/qtestfilelogger.cpp
index a717058..a64a452 100644
--- a/src/testlib/qtestfilelogger.cpp
+++ b/src/testlib/qtestfilelogger.cpp
@@ -73,10 +73,10 @@ void QTestFileLogger::init()
QTestResult::currentTestObjectName());
// Keep filenames simple
- for (int i = 0; i < sizeof(filename) && filename[i]; ++i) {
+ for (uint i = 0; i < sizeof(filename) && filename[i]; ++i) {
char& c = filename[i];
- if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '-'
- || c == '.')) {
+ if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
+ || (c >= '0' && c <= '9') || c == '-' || c == '.')) {
c = '_';
}
}