Source code maintenance

Memory leaks:
- NotifyQt::UpdateGUI -> popup messages (toaster) stay hidden in memory
- p3disc::handleIncoming -> item was not deleted when RsDiscHeartbeat (memory leak every tick)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2852 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-05 22:03:43 +00:00
parent 03fa79eda0
commit c3d92dc472
11 changed files with 124 additions and 97 deletions

View file

@ -18,23 +18,23 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#include "ChatToaster.h"
#include "ui_ChatToaster.h"
#include "QtToaster.h"
#include <QtGui/QtGui>
ChatToaster::ChatToaster()
: QObject(NULL) {
_chatToasterWidget = new QWidget(NULL);
_ui = new Ui::ChatToaster();
_ui->setupUi(_chatToasterWidget);
_ui = new Ui::ChatToaster();
_ui->setupUi(_chatToasterWidget);
_ui->chatButton->setPixmaps(QPixmap(":/images/toaster/chat.png"),
QPixmap(),
@ -42,22 +42,22 @@ ChatToaster::ChatToaster()
QPixmap(":/images/toaster/chat.png"),
QPixmap(),
QPixmap());
connect(_ui->chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(_ui->closeButton, SIGNAL(clicked()), SLOT(close()));
_toaster = new QtToaster(_chatToasterWidget, _ui->windowFrame);
_toaster->setTimeOnTop(5000);
}
_toaster = new QtToaster(this, _chatToasterWidget, _ui->windowFrame);
_toaster->setTimeOnTop(5000);
}
ChatToaster::~ChatToaster() {
delete(_ui);
}
void ChatToaster::setMessage(const QString & message) {
_ui->messageLabel->setText(message);
}
void ChatToaster::setMessage(const QString & message) {
_ui->messageLabel->setText(message);
}
void ChatToaster::setPixmap(const QPixmap & pixmap) {
_ui->pixmapLabel->setPixmap(pixmap);
@ -66,12 +66,12 @@ void ChatToaster::setPixmap(const QPixmap & pixmap) {
void ChatToaster::show() {
_toaster->show();
}
void ChatToaster::close() {
_toaster->close();
}
void ChatToaster::chatButtonSlot() {
chatButtonClicked();
close();
}
void ChatToaster::close() {
_toaster->close();
}
void ChatToaster::chatButtonSlot() {
chatButtonClicked();
close();
}