fixed ifdef problem

This commit is contained in:
csoler 2025-09-11 21:23:12 +02:00
parent d64e4b6e78
commit ee3afd9f40
2 changed files with 6 additions and 6 deletions

View file

@ -81,7 +81,6 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
//connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), this, SLOT(chatMessageReceived(ChatMessage)));
//connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)), this, SLOT(chatStatusReceived(ChatId,QString)));
mEventHandlerId_friends = 0;
mEventHandlerId_chat = 0;
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
@ -102,6 +101,10 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
, this );
}, mEventHandlerId_chat, RsEventType::CHAT_SERVICE );
#else // def RS_DIRECT_CHAT
ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab));
#endif // def RS_DIRECT_CHAT
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
{
RsQThreadUtils::postToObject([=]()
@ -120,10 +123,7 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
, this );
}, mEventHandlerId_friends, RsEventType::FRIEND_LIST );
#else // def RS_DIRECT_CHAT
ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab));
#endif // def RS_DIRECT_CHAT
mEventHandlerId_friends = 0;
connect( ui.mypersonalstatusLabel, SIGNAL(clicked()), SLOT(statusmessage()));
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));

View file

@ -93,8 +93,8 @@ private:
/** Qt Designer generated object */
Ui::FriendsDialog ui;
#ifdef RS_DIRECT_CHAT
RsEventsHandlerId_t mEventHandlerId_friends ;
#ifdef RS_DIRECT_CHAT
RsEventsHandlerId_t mEventHandlerId_chat ;
#endif
};