mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 23:55:35 -04:00
Changed some internals in the chat dialog handling (private chat and lobby).
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4855 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
44ff9fe4f7
commit
2aa1ede192
7 changed files with 62 additions and 8 deletions
|
@ -21,6 +21,7 @@
|
|||
****************************************************************/
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include "ChatDialog.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
|
@ -40,6 +41,7 @@ static std::map<std::string, ChatDialog*> chatDialogs;
|
|||
ChatDialog::ChatDialog(QWidget *parent, Qt::WFlags flags) :
|
||||
QWidget(parent, flags)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
}
|
||||
|
||||
ChatDialog::~ChatDialog()
|
||||
|
@ -50,6 +52,15 @@ ChatDialog::~ChatDialog()
|
|||
}
|
||||
}
|
||||
|
||||
void ChatDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (!canClose()) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
emit dialogClose(this);
|
||||
}
|
||||
|
||||
void ChatDialog::init(const std::string &peerId, const QString &title)
|
||||
{
|
||||
this->peerId = peerId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue