forked from qt-creator/qt-creator
More deprecation induced busywork
QString::count() will vanish. Change-Id: I65672fa648c0969930e9398ec4e541a0771c8a57 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -316,7 +316,7 @@ static SideBySideDiffOutput diffOutput(QPromise<SideBySideShowResults> &promise,
|
||||
addChunkLine(RightSide, -2);
|
||||
blockNumber++;
|
||||
} else {
|
||||
for (int j = 0; j < contextFileData.chunks.count(); j++) {
|
||||
for (int j = 0; j < contextFileData.chunks.size(); j++) {
|
||||
const ChunkData &chunkData = contextFileData.chunks.at(j);
|
||||
|
||||
int leftLineNumber = chunkData.startingLineNumber[LeftSide];
|
||||
@@ -331,7 +331,7 @@ static SideBySideDiffOutput diffOutput(QPromise<SideBySideShowResults> &promise,
|
||||
blockNumber++;
|
||||
}
|
||||
|
||||
const int rows = chunkData.rows.count();
|
||||
const int rows = chunkData.rows.size();
|
||||
output.side[LeftSide].diffData.m_chunkInfo.setChunkIndex(blockNumber, rows, j);
|
||||
output.side[RightSide].diffData.m_chunkInfo.setChunkIndex(blockNumber, rows, j);
|
||||
|
||||
@@ -342,11 +342,11 @@ static SideBySideDiffOutput diffOutput(QPromise<SideBySideShowResults> &promise,
|
||||
}
|
||||
}
|
||||
|
||||
if (j == contextFileData.chunks.count() - 1) { // the last chunk
|
||||
if (j == contextFileData.chunks.size() - 1) { // the last chunk
|
||||
int skippedLines = -2;
|
||||
if (chunkData.contextChunk) {
|
||||
// if it's context chunk
|
||||
skippedLines = chunkData.rows.count();
|
||||
skippedLines = chunkData.rows.size();
|
||||
} else if (!contextFileData.lastChunkAtTheEndOfFile
|
||||
&& !contextFileData.contextChunksIncluded) {
|
||||
// if not a context chunk and not a chunk at the end of file
|
||||
@@ -381,7 +381,7 @@ void SideDiffData::setLineNumber(int blockNumber, int lineNumber)
|
||||
{
|
||||
const QString lineNumberString = QString::number(lineNumber);
|
||||
m_lineNumbers.insert(blockNumber, lineNumber);
|
||||
m_lineNumberDigits = qMax(m_lineNumberDigits, lineNumberString.count());
|
||||
m_lineNumberDigits = qMax(m_lineNumberDigits, lineNumberString.size());
|
||||
}
|
||||
|
||||
void SideDiffData::setFileInfo(int blockNumber, const DiffFileInfo &fileInfo)
|
||||
@@ -986,7 +986,7 @@ void SideBySideDiffEditorWidget::setFontSettings(const FontSettings &fontSetting
|
||||
void SideBySideDiffEditorWidget::jumpToOriginalFileRequested(DiffSide side, int diffFileIndex,
|
||||
int lineNumber, int columnNumber)
|
||||
{
|
||||
if (diffFileIndex < 0 || diffFileIndex >= m_controller.m_contextFileData.count())
|
||||
if (diffFileIndex < 0 || diffFileIndex >= m_controller.m_contextFileData.size())
|
||||
return;
|
||||
|
||||
const FileData fileData = m_controller.m_contextFileData.at(diffFileIndex);
|
||||
@@ -1007,7 +1007,7 @@ void SideBySideDiffEditorWidget::jumpToOriginalFileRequested(DiffSide side, int
|
||||
int thisLineNumber = chunkData.startingLineNumber[side];
|
||||
int otherLineNumber = chunkData.startingLineNumber[otherSide];
|
||||
|
||||
for (int j = 0; j < chunkData.rows.count(); j++) {
|
||||
for (int j = 0; j < chunkData.rows.size(); j++) {
|
||||
const RowData rowData = chunkData.rows.at(j);
|
||||
if (rowData.line[side].textLineType == TextLineData::TextLine)
|
||||
thisLineNumber++;
|
||||
|
||||
Reference in New Issue
Block a user