summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qtemporarydir.cpp4
-rw-r--r--src/corelib/json/qjsonparser.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp2
-rw-r--r--src/corelib/mimetypes/qmimemagicrule.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp2
-rw-r--r--src/gui/text/qzip.cpp2
-rw-r--r--src/network/access/qnetworkcookie.cpp2
-rw-r--r--src/tools/qdoc/tokenizer.cpp4
8 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp
index f8cd2e780e..579d569a01 100644
--- a/src/corelib/io/qtemporarydir.cpp
+++ b/src/corelib/io/qtemporarydir.cpp
@@ -99,11 +99,11 @@ static char *mkdtemp(char *templateName)
{
static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- const int length = strlen(templateName);
+ const size_t length = strlen(templateName);
char *XXXXXX = templateName + length - 6;
- if ((length < 6) || strncmp(XXXXXX, "XXXXXX", 6))
+ if ((length < 6u) || strncmp(XXXXXX, "XXXXXX", 6))
return 0;
for (int i = 0; i < 256; ++i) {
diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp
index 6de3db8af8..9b11c9ac3e 100644
--- a/src/corelib/json/qjsonparser.cpp
+++ b/src/corelib/json/qjsonparser.cpp
@@ -821,7 +821,7 @@ bool Parser::parseString(bool *latin1)
// no unicode string, we are done
if (*latin1) {
// write string length
- *(QJsonPrivate::qle_ushort *)(data + stringPos) = current - outStart - sizeof(ushort);
+ *(QJsonPrivate::qle_ushort *)(data + stringPos) = ushort(current - outStart - sizeof(ushort));
int pos = reserveSpace((4 - current) & 3);
while (pos & 3)
data[pos++] = 0;
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index c1f7c8ab25..7cc1f0e286 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -109,7 +109,7 @@ Q_CORE_EXPORT QString qAppFileName() // get application file name
size = MAX_PATH * i;
b = reinterpret_cast<wchar_t *>(realloc(b, (size + 1) * sizeof(wchar_t)));
if (b)
- v = GetModuleFileName(NULL, b, size);
+ v = GetModuleFileName(NULL, b, DWORD(size));
} while (b && v == size);
if (b)
diff --git a/src/corelib/mimetypes/qmimemagicrule.cpp b/src/corelib/mimetypes/qmimemagicrule.cpp
index 1dee62f6d0..8421516b5c 100644
--- a/src/corelib/mimetypes/qmimemagicrule.cpp
+++ b/src/corelib/mimetypes/qmimemagicrule.cpp
@@ -267,7 +267,7 @@ QMimeMagicRule::QMimeMagicRule(QMimeMagicRule::Type theType,
d->mask = QByteArray::fromHex(QByteArray::fromRawData(d->mask.constData() + 2, d->mask.size() - 2));
Q_ASSERT(d->mask.size() == d->pattern.size());
} else {
- d->mask.fill(static_cast<char>(0xff), d->pattern.size());
+ d->mask.fill(char(-1), d->pattern.size());
}
d->mask.squeeze();
d->matchFunction = matchString;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 3d58d91169..7d366275a3 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -63,7 +63,7 @@
QT_BEGIN_NAMESPACE
-static const float smallCapsFraction = 0.7;
+static const float smallCapsFraction = 0.7f;
namespace {
// Helper class used in QTextEngine::itemize
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 337326d3d7..1491c1efbc 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -505,7 +505,7 @@ void QZipReaderPrivate::scanFiles()
int num_dir_entries = 0;
EndOfDirectory eod;
while (start_of_directory == -1) {
- int pos = device->size() - sizeof(EndOfDirectory) - i;
+ const int pos = device->size() - int(sizeof(EndOfDirectory)) - i;
if (pos < 0 || i > 65535) {
qWarning() << "QZip: EndOfDirectory not found";
return;
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 0dbfdb2f0c..7174acc31e 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -606,7 +606,7 @@ static bool checkStaticArray(int &val, const QByteArray &dateString, int at, con
val = j;
return true;
}
- i += strlen(str) + 1;
+ i += int(strlen(str)) + 1;
++j;
}
}
diff --git a/src/tools/qdoc/tokenizer.cpp b/src/tools/qdoc/tokenizer.cpp
index c87764b934..7d9039e299 100644
--- a/src/tools/qdoc/tokenizer.cpp
+++ b/src/tools/qdoc/tokenizer.cpp
@@ -116,7 +116,7 @@ static int hashKword(const char *s, int len)
static void insertKwordIntoHash(const char *s, int number)
{
- int k = hashKword(s, strlen(s));
+ int k = hashKword(s, int(strlen(s)));
while (kwordHashTable[k]) {
if (++k == KwordHashTableSize)
k = 0;
@@ -166,7 +166,7 @@ int Tokenizer::getToken()
yyCh = getChar();
} while (isalnum(yyCh) || yyCh == '_');
- int k = hashKword(yyLex, yyLexLen);
+ int k = hashKword(yyLex, int(yyLexLen));
for (;;) {
int i = kwordHashTable[k];
if (i == 0) {