mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 15:15:15 -04:00
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:
parent
03fa79eda0
commit
c3d92dc472
11 changed files with 124 additions and 97 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue