Remove isEdit from ChatDocumentHandler
Remove isEdit from ChatDocumentHandler as it was made redundant by the ChatCache rework.
This commit is contained in:
committed by
Tobias Fella
parent
12689babfb
commit
7e3db20229
@@ -148,20 +148,6 @@ int ChatDocumentHandler::completionStartIndex() const
|
|||||||
return start;
|
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
|
QQuickTextDocument *ChatDocumentHandler::document() const
|
||||||
{
|
{
|
||||||
return m_document;
|
return m_document;
|
||||||
|
|||||||
@@ -62,14 +62,6 @@ class ChatDocumentHandler : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
QML_ELEMENT
|
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.
|
* @brief The QQuickTextDocument that is being handled.
|
||||||
*/
|
*/
|
||||||
@@ -121,9 +113,6 @@ class ChatDocumentHandler : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit ChatDocumentHandler(QObject *parent = nullptr);
|
explicit ChatDocumentHandler(QObject *parent = nullptr);
|
||||||
|
|
||||||
[[nodiscard]] bool isEdit() const;
|
|
||||||
void setIsEdit(bool edit);
|
|
||||||
|
|
||||||
[[nodiscard]] QQuickTextDocument *document() const;
|
[[nodiscard]] QQuickTextDocument *document() const;
|
||||||
void setDocument(QQuickTextDocument *document);
|
void setDocument(QQuickTextDocument *document);
|
||||||
|
|
||||||
@@ -154,7 +143,6 @@ public:
|
|||||||
void setErrorColor(const QColor &color);
|
void setErrorColor(const QColor &color);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void isEditChanged();
|
|
||||||
void documentChanged();
|
void documentChanged();
|
||||||
void cursorPositionChanged();
|
void cursorPositionChanged();
|
||||||
void roomChanged();
|
void roomChanged();
|
||||||
@@ -168,8 +156,6 @@ Q_SIGNALS:
|
|||||||
private:
|
private:
|
||||||
int completionStartIndex() const;
|
int completionStartIndex() const;
|
||||||
|
|
||||||
bool m_isEdit = false;
|
|
||||||
|
|
||||||
QPointer<QQuickTextDocument> m_document;
|
QPointer<QQuickTextDocument> m_document;
|
||||||
|
|
||||||
QPointer<NeoChatRoom> m_room;
|
QPointer<NeoChatRoom> m_room;
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ QQC2.TextArea {
|
|||||||
|
|
||||||
ChatDocumentHandler {
|
ChatDocumentHandler {
|
||||||
id: documentHandler
|
id: documentHandler
|
||||||
isEdit: true
|
|
||||||
document: root.textDocument
|
document: root.textDocument
|
||||||
cursorPosition: root.cursorPosition
|
cursorPosition: root.cursorPosition
|
||||||
selectionStart: root.selectionStart
|
selectionStart: root.selectionStart
|
||||||
|
|||||||
Reference in New Issue
Block a user