mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 06:09:09 -04:00
Fix Clang warnings: 'PopupDistantChatDialog::init' hides overloaded
virtual function warning: 'PopupDistantChatDialog::init' hides overloaded virtual function [-Woverloaded-virtual] virtual void init(const DistantChatPeerId& peer_id); /retroshare-gui/src/gui/chat/PopupChatDialog.h:49: hidden overloaded virtual function 'PopupChatDialog::init' declared here: different number of parameters (2 vs 1) virtual void init(const ChatId &chat_id, const QString &title);
This commit is contained in:
parent
eea49d96bf
commit
07b67e9cc9
3 changed files with 10 additions and 7 deletions
|
@ -109,7 +109,7 @@ void ChatDialog::init(const ChatId &id, const QString &title)
|
||||||
{
|
{
|
||||||
PopupDistantChatDialog* pdcd = new PopupDistantChatDialog(id.toDistantChatId());
|
PopupDistantChatDialog* pdcd = new PopupDistantChatDialog(id.toDistantChatId());
|
||||||
|
|
||||||
pdcd->init(id.toDistantChatId());
|
pdcd->init(id, "");
|
||||||
cd = pdcd;
|
cd = pdcd;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -63,9 +63,12 @@ PopupDistantChatDialog::PopupDistantChatDialog(const DistantChatPeerId& tunnel_i
|
||||||
updateDisplay() ;
|
updateDisplay() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupDistantChatDialog::init(const DistantChatPeerId &peer_id)
|
void PopupDistantChatDialog::init(const ChatId &chat_id, const QString &/*title*/)
|
||||||
{
|
{
|
||||||
_tunnel_id = peer_id;
|
if (!chat_id.isDistantChatId())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_tunnel_id = chat_id.toDistantChatId();
|
||||||
DistantChatPeerInfo tinfo;
|
DistantChatPeerInfo tinfo;
|
||||||
|
|
||||||
if(!rsMsgs->getDistantChatStatus(_tunnel_id,tinfo))
|
if(!rsMsgs->getDistantChatStatus(_tunnel_id,tinfo))
|
||||||
|
@ -74,15 +77,15 @@ void PopupDistantChatDialog::init(const DistantChatPeerId &peer_id)
|
||||||
RsIdentityDetails iddetails ;
|
RsIdentityDetails iddetails ;
|
||||||
|
|
||||||
if(rsIdentity->getIdDetails(tinfo.to_id,iddetails))
|
if(rsIdentity->getIdDetails(tinfo.to_id,iddetails))
|
||||||
PopupChatDialog::init(ChatId(peer_id), QString::fromUtf8(iddetails.mNickname.c_str())) ;
|
PopupChatDialog::init(chat_id, QString::fromUtf8(iddetails.mNickname.c_str())) ;
|
||||||
else
|
else
|
||||||
PopupChatDialog::init(ChatId(peer_id), QString::fromStdString(tinfo.to_id.toStdString())) ;
|
PopupChatDialog::init(chat_id, QString::fromStdString(tinfo.to_id.toStdString())) ;
|
||||||
|
|
||||||
// Do not use setOwnId, because we don't want the user to change the GXS avatar from the chat window
|
// Do not use setOwnId, because we don't want the user to change the GXS avatar from the chat window
|
||||||
// it will not be transmitted.
|
// it will not be transmitted.
|
||||||
|
|
||||||
ui.ownAvatarWidget->setOwnId() ; // sets the flag
|
ui.ownAvatarWidget->setOwnId() ; // sets the flag
|
||||||
ui.ownAvatarWidget->setId(ChatId(peer_id)) ; // sets the actual Id
|
ui.ownAvatarWidget->setId(chat_id) ; // sets the actual Id
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupDistantChatDialog::updateDisplay()
|
void PopupDistantChatDialog::updateDisplay()
|
||||||
|
|
|
@ -38,7 +38,7 @@ class PopupDistantChatDialog: public PopupChatDialog
|
||||||
/** Default destructor */
|
/** Default destructor */
|
||||||
virtual ~PopupDistantChatDialog();
|
virtual ~PopupDistantChatDialog();
|
||||||
|
|
||||||
virtual void init(const DistantChatPeerId& peer_id);
|
virtual void init(const ChatId& chat_id, const QString &title);
|
||||||
virtual void closeEvent(QCloseEvent *e) ;
|
virtual void closeEvent(QCloseEvent *e) ;
|
||||||
|
|
||||||
virtual QString getPeerName(const ChatId &id) const ;
|
virtual QString getPeerName(const ChatId &id) const ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue