diff options
Diffstat (limited to 'src/gui/text/qtextmarkdownimporter.cpp')
-rw-r--r-- | src/gui/text/qtextmarkdownimporter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/text/qtextmarkdownimporter.cpp b/src/gui/text/qtextmarkdownimporter.cpp index a839ca9623..14f1d9054f 100644 --- a/src/gui/text/qtextmarkdownimporter.cpp +++ b/src/gui/text/qtextmarkdownimporter.cpp @@ -148,7 +148,7 @@ int QTextMarkdownImporter::cbEnterBlock(int blockType, void *det) switch (blockType) { case MD_BLOCK_P: if (!m_listStack.isEmpty()) - qCDebug(lcMD, m_listItem ? "P of LI at level %d" : "P continuation inside LI at level %d", int(m_listStack.count())); + qCDebug(lcMD, m_listItem ? "P of LI at level %d" : "P continuation inside LI at level %d", int(m_listStack.size())); else qCDebug(lcMD, "P"); m_needsInsertBlock = true; @@ -202,7 +202,7 @@ int QTextMarkdownImporter::cbEnterBlock(int blockType, void *det) m_needsInsertList = true; MD_BLOCK_UL_DETAIL *detail = static_cast<MD_BLOCK_UL_DETAIL *>(det); m_listFormat = QTextListFormat(); - m_listFormat.setIndent(m_listStack.count() + 1); + m_listFormat.setIndent(m_listStack.size() + 1); switch (detail->mark) { case '*': m_listFormat.setStyle(QTextListFormat::ListCircle); @@ -214,7 +214,7 @@ int QTextMarkdownImporter::cbEnterBlock(int blockType, void *det) m_listFormat.setStyle(QTextListFormat::ListDisc); break; } - qCDebug(lcMD, "UL %c level %d", detail->mark, int(m_listStack.count()) + 1); + qCDebug(lcMD, "UL %c level %d", detail->mark, int(m_listStack.size()) + 1); } break; case MD_BLOCK_OL: { if (m_needsInsertList) // list nested in an empty list @@ -223,10 +223,10 @@ int QTextMarkdownImporter::cbEnterBlock(int blockType, void *det) m_needsInsertList = true; MD_BLOCK_OL_DETAIL *detail = static_cast<MD_BLOCK_OL_DETAIL *>(det); m_listFormat = QTextListFormat(); - m_listFormat.setIndent(m_listStack.count() + 1); + m_listFormat.setIndent(m_listStack.size() + 1); m_listFormat.setNumberSuffix(QChar::fromLatin1(detail->mark_delimiter)); m_listFormat.setStyle(QTextListFormat::ListDecimal); - qCDebug(lcMD, "OL xx%d level %d", detail->mark_delimiter, int(m_listStack.count()) + 1); + qCDebug(lcMD, "OL xx%d level %d", detail->mark_delimiter, int(m_listStack.size()) + 1); } break; case MD_BLOCK_TD: { MD_BLOCK_TD_DETAIL *detail = static_cast<MD_BLOCK_TD_DETAIL *>(det); @@ -297,7 +297,7 @@ int QTextMarkdownImporter::cbLeaveBlock(int blockType, void *detail) if (Q_UNLIKELY(m_listStack.isEmpty())) { qCWarning(lcMD, "list ended unexpectedly"); } else { - qCDebug(lcMD, "list at level %d ended", int(m_listStack.count())); + qCDebug(lcMD, "list at level %d ended", int(m_listStack.size())); m_listStack.pop(); } break; @@ -334,7 +334,7 @@ int QTextMarkdownImporter::cbLeaveBlock(int blockType, void *detail) m_cursor->movePosition(QTextCursor::End); break; case MD_BLOCK_LI: - qCDebug(lcMD, "LI at level %d ended", int(m_listStack.count())); + qCDebug(lcMD, "LI at level %d ended", int(m_listStack.size())); m_listItem = false; break; case MD_BLOCK_CODE: { @@ -591,7 +591,7 @@ void QTextMarkdownImporter::insertBlock() else blockFormat.setMarker(m_markerType); if (!m_listStack.isEmpty()) - blockFormat.setIndent(m_listStack.count()); + blockFormat.setIndent(m_listStack.size()); if (m_doc->isEmpty()) { m_cursor->setBlockFormat(blockFormat); m_cursor->setCharFormat(charFormat); |