fixed compilation

This commit is contained in:
csoler 2025-08-17 18:06:08 +02:00
parent 798775e12b
commit bfcfa2293b
4 changed files with 17 additions and 4 deletions

View file

@ -32,6 +32,7 @@
#include "IMHistoryItemDelegate.h"
#include "IMHistoryItemPainter.h"
#include "util/HandleRichText.h"
#include "util/qtthreadsutils.h"
#include "gui/common/FilesDefs.h"
#include "rshare.h"
@ -101,7 +102,7 @@ ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const Q
m_chatId = chatId;
textEdit = edit;
connect(NotifyQt::getInstance(), SIGNAL(historyChanged(uint, int)), this, SLOT(historyChanged(uint, int)));
//connect(NotifyQt::getInstance(), SIGNAL(historyChanged(uint, int)), this, SLOT(historyChanged(uint, int)));
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
@ -138,6 +139,19 @@ ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const Q
connect(m_createThread, SIGNAL(finished()), this, SLOT(createThreadFinished()));
connect(m_createThread, SIGNAL(progress(int,int)), this, SLOT(createThreadProgress(int,int)));
m_createThread->start();
mEventHandlerId = 0;
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
{
RsQThreadUtils::postToObject([=](){
auto ev = dynamic_cast<const RsChatServiceEvent*>(event.get());
if(ev->mEventCode == RsChatServiceEventCode::CHAT_HISTORY_CHANGED)
historyChanged(ev->mMsgHistoryId,ev->mHistoryChangeType);
}, this );
}, mEventHandlerId, RsEventType::CHAT_SERVICE );
}
ImHistoryBrowser::~ImHistoryBrowser()

View file

@ -86,6 +86,7 @@ private:
/** Qt Designer generated object */
Ui::ImHistoryBrowser ui;
RsEventsHandlerId_t mEventHandlerId;
};
class ImHistoryBrowserCreateItemsThread : public QThread

View file

@ -513,7 +513,6 @@ void NotifyQt::notifyTurtleSearchResult(const RsPeerId& pid,uint32_t search_id,c
emit gotTurtleSearchResult(search_id,det) ;
}
}
#endif
void NotifyQt::notifyHistoryChanged(uint32_t msgId, int type)
{
@ -526,7 +525,6 @@ void NotifyQt::notifyHistoryChanged(uint32_t msgId, int type)
emit historyChanged(msgId, type);
}
#ifdef TO_REMOVE
void NotifyQt::notifyListChange(int list, int type)
{
{

View file

@ -83,7 +83,7 @@ class NotifyQt: public QObject, public NotifyClient
/* one or more peers has changed the states */
// virtual void notifyPeerStatusChangedSummary();
virtual void notifyHistoryChanged(uint32_t msgId, int type);
// virtual void notifyHistoryChanged(uint32_t msgId, int type);
// virtual void notifyDiscInfoChanged() ;
virtual bool askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad, std::string& password, bool &cancelled);