Fix Clang warnings: change ChatDialog::init definition

warning: 'PopupChatDialog::init' hides overloaded virtual function [-
Woverloaded-virtual]
    virtual void init(const ChatId &chat_id, const QString &title);
                 ^
/retroshare-gui/src/gui/chat/ChatDialog.h:87: hidden overloaded virtual
function 'ChatDialog::init' declared here: type mismatch at 1st
parameter ('ChatId' vs 'const ChatId &')
    virtual void init(ChatId id, const QString &title);
                 ^
This commit is contained in:
Phenom 2017-03-18 11:56:11 +01:00 committed by csoler
parent 9319caffc7
commit eea49d96bf
5 changed files with 6 additions and 12 deletions

View File

@ -63,7 +63,7 @@ void ChatDialog::closeEvent(QCloseEvent *event)
emit dialogClose(this);
}
void ChatDialog::init(ChatId id, const QString &title)
void ChatDialog::init(const ChatId &id, const QString &title)
{
mChatId = id;
ChatWidget *cw = getChatWidget();
@ -102,7 +102,7 @@ void ChatDialog::init(ChatId id, const QString &title)
if (chatflags & RS_CHAT_OPEN) {
if (id.isLobbyId()) {
ChatLobbyDialog* cld = new ChatLobbyDialog(id.toLobbyId());
cld->init();
cld->init(ChatId(), "");
cd = cld;
}
else if(id.isDistantChatId())

View File

@ -84,7 +84,7 @@ protected:
virtual QString getPeerName(const ChatId &sslid) const ; // can be overloaded for chat dialogs that have specific peers
virtual QString getOwnName() const;
virtual void init(ChatId id, const QString &title);
virtual void init(const ChatId &id, const QString &title);
virtual void addChatMsg(const ChatMessage& msg) = 0;
ChatId mChatId;

View File

@ -304,12 +304,7 @@ void ChatLobbyDialog::showInPeopleTab()
idDialog->navigate(nickname);
}
void ChatLobbyDialog::init(ChatId /*id*/, const QString &/*title*/)
{
init();
}
void ChatLobbyDialog::init()
void ChatLobbyDialog::init(const ChatId &/*id*/, const QString &/*title*/)
{
ChatLobbyInfo linfo ;

View File

@ -71,8 +71,7 @@ protected:
virtual ~ChatLobbyDialog();
void processSettings(bool load);
virtual void init(ChatId id, const QString &title);
void init();
virtual void init(const ChatId &id, const QString &title);
virtual bool canClose();
virtual void addChatMsg(const ChatMessage &msg);

View File

@ -46,7 +46,7 @@ protected:
/** Default destructor */
virtual ~PopupChatDialog();
virtual void init(const ChatId &chat_id, const QString &title);
virtual void init(const ChatId &chat_id, const QString &title);
virtual void showDialog(uint chatflags);
virtual ChatWidget *getChatWidget();
virtual bool hasPeerStatus() { return true; }