Standardize on int for line and column values

Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.

The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.

Because it reduces friction further, also do it in libcplusplus.

Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
hjk
2019-07-24 18:40:10 +02:00
parent eab0df22f9
commit 7ab6783e24
153 changed files with 3181 additions and 3194 deletions

View File

@@ -70,7 +70,7 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc,
return preprocessed;
}
void FastPreprocessor::sourceNeeded(unsigned line, const QString &fileName, IncludeType mode,
void FastPreprocessor::sourceNeeded(int line, const QString &fileName, IncludeType mode,
const QStringList &initialIncludes)
{
Q_UNUSED(initialIncludes)
@@ -115,8 +115,8 @@ static const Macro revision(const Snapshot &s, const Macro &m)
return m;
}
void FastPreprocessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charsOffset,
unsigned line, const Macro &macro)
void FastPreprocessor::passedMacroDefinitionCheck(int bytesOffset, int utf16charsOffset,
int line, const Macro &macro)
{
Q_ASSERT(_currentDoc);
@@ -126,7 +126,7 @@ void FastPreprocessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsigned
line, QVector<MacroArgumentReference>());
}
void FastPreprocessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charsOffset,
void FastPreprocessor::failedMacroDefinitionCheck(int bytesOffset, int utf16charsOffset,
const ByteArrayRef &name)
{
Q_ASSERT(_currentDoc);
@@ -135,8 +135,8 @@ void FastPreprocessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsigned
bytesOffset, utf16charsOffset);
}
void FastPreprocessor::notifyMacroReference(unsigned bytesOffset, unsigned utf16charsOffset,
unsigned line, const Macro &macro)
void FastPreprocessor::notifyMacroReference(int bytesOffset, int utf16charsOffset,
int line, const Macro &macro)
{
Q_ASSERT(_currentDoc);
@@ -146,8 +146,8 @@ void FastPreprocessor::notifyMacroReference(unsigned bytesOffset, unsigned utf16
line, QVector<MacroArgumentReference>());
}
void FastPreprocessor::startExpandingMacro(unsigned bytesOffset, unsigned utf16charsOffset,
unsigned line, const Macro &macro,
void FastPreprocessor::startExpandingMacro(int bytesOffset, int utf16charsOffset,
int line, const Macro &macro,
const QVector<MacroArgumentReference> &actuals)
{
Q_ASSERT(_currentDoc);