summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-05-23 16:52:27 +0300
committerFabian Kosmale <fabian.kosmale@qt.io>2023-06-20 06:35:03 +0000
commit2271ee6b4b5b89a5f77c4260333921bd9c3e91af (patch)
treea490554458edbee556e5ea71c02fcb62fe05bcb9 /src/tools/moc/moc.cpp
parent7022d0e22364b7c075a20670d023fc590a0a7ac4 (diff)
Moc: port to qsizetype
Pick-to: 6.6 6.5 Change-Id: Ibacc9b4bd6c26b890a09f689c730286c2aa0894c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 1d1948525c..fb9f18eaca 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -663,7 +663,7 @@ void Moc::parse()
Token t = next();
switch (t) {
case NAMESPACE: {
- int rewind = index;
+ qsizetype rewind = index;
if (test(IDENTIFIER)) {
QByteArray nsName = lexem();
QByteArrayList nested;
@@ -972,7 +972,7 @@ void Moc::parse()
default:
FunctionDef funcDef;
funcDef.access = access;
- int rewind = index--;
+ qsizetype rewind = index--;
if (parseMaybeFunction(&def, &funcDef)) {
if (funcDef.isConstructor) {
if ((access == FunctionDef::Public) && funcDef.isInvokable) {
@@ -1760,7 +1760,7 @@ void Moc::parseSlotInPrivate(ClassDef *def, FunctionDef::Access access)
QByteArray Moc::lexemUntil(Token target)
{
- int from = index;
+ qsizetype from = index;
until(target);
QByteArray s;
while (from <= index) {
@@ -1796,7 +1796,7 @@ bool Moc::until(Token target) {
//when searching commas within the default argument, we should take care of template depth (anglecount)
// unfortunately, we do not have enough semantic information to know if '<' is the operator< or
// the beginning of a template type. so we just use heuristics.
- int possible = -1;
+ qsizetype possible = -1;
while (index < symbols.size()) {
Token t = symbols.at(index++).token;
@@ -1931,7 +1931,7 @@ void Moc::checkProperties(ClassDef *cdef)
}
if (p.read.isEmpty() && p.member.isEmpty() && p.bind.isEmpty()) {
- const int rewind = index;
+ const qsizetype rewind = index;
if (p.location >= 0)
index = p.location;
QByteArray msg = "Property declaration " + p.name + " has neither an associated QProperty<> member"
@@ -1987,7 +1987,7 @@ void Moc::checkProperties(ClassDef *cdef)
cdef->nonClassSignalList << p.notify;
p.notifyId = int(-1 - cdef->nonClassSignalList.size());
} else {
- p.notifyId = -2 - index;
+ p.notifyId = int(-2 - index);
}
}
}