SetCommentCommand.h header

#include <ew/core/SetCommentCommand.h>

Namespace ew::core

SetCommentCommand class

class ew::core::SetCommentCommand

Command that replaces a comment's editable state – its body text, inline anchor, and resolved flag – and stamps a new last-edited time, as produced by editing or resolving a comment in the review UI. (The author, target, thread parent, and creation time are fixed once a comment is posted and are not touched here.) Undo restores the previous state, including the old last-edited time, and redo re-applies the new one.

Members

ew::core::SetCommentCommand::SetCommentCommand(Comment &comment, QString body, QString anchor, bool resolved, QDateTime updatedAt)

Creates a command that, when applied, sets comment's body to body, anchor to anchor, resolved flag to resolved, and last-edited time to updatedAt.

ew::core::SetCommentCommand::~SetCommentCommand() override

Destroys the command.

void ew::core::SetCommentCommand::apply() override

Records the comment's current editable state and applies the new one.

void ew::core::SetCommentCommand::undo() override

Restores the previous editable state.

QString ew::core::SetCommentCommand::description() const override

Returns a short description for the undo/redo UI.