Refactor EventHandler
Refactor EventHandler to be a Q_GADGET and create from a constructor
This commit is contained in:
@@ -502,9 +502,7 @@ void NeoChatRoom::postHtmlMessage(const QString &text,
|
||||
}
|
||||
|
||||
if (isThread) {
|
||||
EventHandler eventHandler;
|
||||
eventHandler.setRoom(this);
|
||||
eventHandler.setEvent(&**replyIt);
|
||||
EventHandler eventHandler(this, &**replyIt);
|
||||
|
||||
const bool isFallingBack = !eventHandler.isThreaded();
|
||||
|
||||
@@ -551,9 +549,7 @@ void NeoChatRoom::postHtmlMessage(const QString &text,
|
||||
if (isReply) {
|
||||
const auto &replyEvt = **replyIt;
|
||||
|
||||
EventHandler eventHandler;
|
||||
eventHandler.setRoom(this);
|
||||
eventHandler.setEvent(&**replyIt);
|
||||
EventHandler eventHandler(this, &**replyIt);
|
||||
|
||||
// clang-format off
|
||||
QJsonObject json{
|
||||
|
||||
Reference in New Issue
Block a user