From 2e1f2f9cc5e4239fc882f598b578e2719daefcb6 Mon Sep 17 00:00:00 2001 From: AngryFender Date: Mon, 29 Jul 2024 23:20:16 +0100 Subject: [PATCH] Github Issue #198: Removed unnecessary code --- mktextdocument.cpp | 15 --------------- mktextdocument.h | 1 - 2 files changed, 16 deletions(-) diff --git a/mktextdocument.cpp b/mktextdocument.cpp index a511c89..20bf6d9 100644 --- a/mktextdocument.cpp +++ b/mktextdocument.cpp @@ -654,21 +654,6 @@ void MkTextDocument::applyCheckBoxLinkEffect(FormatData *data, QTextBlock &block } } -void MkTextDocument::applyCheckBoxLinkEffect(QTextBlock &block, int start, int end, FragmentData::FormatSymbol status) -{ - if( status == FragmentData::CHECKED_END || status == FragmentData::UNCHECKED_END ){ - const QPair checkPos(block.blockNumber(), start); - if(!checkMarkPositions.contains(checkPos)){ - checkMarkPositions.append(checkPos); - } - }else if(status == FragmentData::LINK_TITLE){ - const std::tuple linkPos(block.blockNumber(), start, end); - if(!linkPositions.contains(linkPos)){ - linkPositions.append(linkPos); - } - } -} - void MkTextDocument::hideSymbols(QTextBlock &block,const QString &symbol) { QString textBlock = block.text(); diff --git a/mktextdocument.h b/mktextdocument.h index dc3a619..ebc86da 100644 --- a/mktextdocument.h +++ b/mktextdocument.h @@ -212,7 +212,6 @@ public slots: void resetTextBlockFormat(QTextBlock block); void applyMkFormat(QTextBlock &block, int start, int end, FragmentData::FormatSymbol status,FormatCollection &formatCollection); void applyCheckBoxLinkEffect(FormatData *data, QTextBlock &block, QTextCursor &cursor); - void applyCheckBoxLinkEffect(QTextBlock &block, int start, int end, FragmentData::FormatSymbol status); void hideSymbols(QTextBlock &block,const QString &symbol); void hideSymbolsAtPos(QString &text, int pos, const QString &symbol);