diff --git a/src/chatdocumenthandler.cpp b/src/chatdocumenthandler.cpp index 133739c27..303e42b6f 100644 --- a/src/chatdocumenthandler.cpp +++ b/src/chatdocumenthandler.cpp @@ -148,20 +148,6 @@ int ChatDocumentHandler::completionStartIndex() const return start; } -bool ChatDocumentHandler::isEdit() const -{ - return m_isEdit; -} - -void ChatDocumentHandler::setIsEdit(bool edit) -{ - if (edit == m_isEdit) { - return; - } - m_isEdit = edit; - Q_EMIT isEditChanged(); -} - QQuickTextDocument *ChatDocumentHandler::document() const { return m_document; diff --git a/src/chatdocumenthandler.h b/src/chatdocumenthandler.h index a262fad01..617b9ce16 100644 --- a/src/chatdocumenthandler.h +++ b/src/chatdocumenthandler.h @@ -62,14 +62,6 @@ class ChatDocumentHandler : public QObject Q_OBJECT QML_ELEMENT - /** - * @brief Is the instance being used to handle an edit message. - * - * This is needed to ensure that the text and mentions are saved and retrieved - * from the correct parameters in the assigned room. - */ - Q_PROPERTY(bool isEdit READ isEdit WRITE setIsEdit NOTIFY isEditChanged) - /** * @brief The QQuickTextDocument that is being handled. */ @@ -121,9 +113,6 @@ class ChatDocumentHandler : public QObject public: explicit ChatDocumentHandler(QObject *parent = nullptr); - [[nodiscard]] bool isEdit() const; - void setIsEdit(bool edit); - [[nodiscard]] QQuickTextDocument *document() const; void setDocument(QQuickTextDocument *document); @@ -154,7 +143,6 @@ public: void setErrorColor(const QColor &color); Q_SIGNALS: - void isEditChanged(); void documentChanged(); void cursorPositionChanged(); void roomChanged(); @@ -168,8 +156,6 @@ Q_SIGNALS: private: int completionStartIndex() const; - bool m_isEdit = false; - QPointer m_document; QPointer m_room; diff --git a/src/qml/MessageEditComponent.qml b/src/qml/MessageEditComponent.qml index 2b4cfa6cf..f88f0eb4d 100644 --- a/src/qml/MessageEditComponent.qml +++ b/src/qml/MessageEditComponent.qml @@ -129,7 +129,6 @@ QQC2.TextArea { ChatDocumentHandler { id: documentHandler - isEdit: true document: root.textDocument cursorPosition: root.cursorPosition selectionStart: root.selectionStart