forked from qt-creator/qt-creator
Utils: More forward declarations / drop unused headers [T-Z]
Round 1 - focus on headers. For classes with initial in range [T-Z]. Replace QT_FORWARD_DECLARE_CLASS with QT_BEGIN_NAMESPACE and QT_END_NAMESPACE and forward declare inside. Change-Id: I4ac3a8391e6167aa2db3973a9f94a45ac3c8ebd1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -165,7 +165,7 @@ int utf8NthLineOffset(const QTextDocument *textDocument, const QByteArray &buffe
|
||||
|
||||
LineColumn utf16LineColumn(const QByteArray &utf8Buffer, int utf8Offset)
|
||||
{
|
||||
Utils::LineColumn lineColumn;
|
||||
LineColumn lineColumn;
|
||||
lineColumn.line = static_cast<int>(
|
||||
std::count(utf8Buffer.begin(), utf8Buffer.begin() + utf8Offset, '\n'))
|
||||
+ 1;
|
||||
@@ -221,7 +221,7 @@ void applyReplacements(QTextDocument *doc, const Replacements &replacements)
|
||||
int fullOffsetShift = 0;
|
||||
QTextCursor editCursor(doc);
|
||||
editCursor.beginEditBlock();
|
||||
for (const Utils::Text::Replacement &replacement : replacements) {
|
||||
for (const Text::Replacement &replacement : replacements) {
|
||||
editCursor.setPosition(replacement.offset + fullOffsetShift);
|
||||
editCursor.movePosition(QTextCursor::NextCharacter,
|
||||
QTextCursor::KeepAnchor,
|
||||
|
||||
Reference in New Issue
Block a user