aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/notifier/NotifierMessage.cpp
diff options
context:
space:
mode:
authorGravatar IceN9ne2017-10-21 18:10:40 -0400
committerGravatar IceN9ne2017-10-21 18:10:40 -0400
commite9f3c2248ab67e1265667de5ddc6bc59ce235c98 (patch)
tree1f5d9b5954582e6c68f69ae0226e7b969c6549fa /src/modules/notifier/NotifierMessage.cpp
parentMake the issue/PR templates much simpler. (#2301) (diff)
downloadKVIrc-e9f3c2248ab67e1265667de5ddc6bc59ce235c98.tar.gz
KVIrc-e9f3c2248ab67e1265667de5ddc6bc59ce235c98.tar.bz2
KVIrc-e9f3c2248ab67e1265667de5ddc6bc59ce235c98.zip
notifier module: general code cleanup
Diffstat (limited to 'src/modules/notifier/NotifierMessage.cpp')
-rw-r--r--src/modules/notifier/NotifierMessage.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/modules/notifier/NotifierMessage.cpp b/src/modules/notifier/NotifierMessage.cpp
index b0a6e401b..83910e576 100644
--- a/src/modules/notifier/NotifierMessage.cpp
+++ b/src/modules/notifier/NotifierMessage.cpp
@@ -33,17 +33,8 @@
#include <QResizeEvent>
NotifierMessage::NotifierMessage(QPixmap * pPixmap, const QString & szText)
+ : m_szText{szText}, m_pPixmap{pPixmap}
{
- m_pLabel0 = nullptr;
- m_pLabel1 = nullptr;
-
- m_szText = szText;
- m_pPixmap = pPixmap;
-
- //QByteArray utf8 = szText.toUtf8();
- //if(utf8.data())
- // qDebug("NOTIFIER TEXT MESSAGE: \n%s\n",utf8.data());
-
m_pHBox = new QHBoxLayout(this);
m_pHBox->setSpacing(SPACING);
m_pHBox->setMargin(SPACING);
@@ -63,14 +54,14 @@ NotifierMessage::~NotifierMessage()
void NotifierMessage::updateGui()
{
- bool bShowImages = KVI_OPTION_BOOL(KviOption_boolIrcViewShowImages);
-
if(m_pLabel0)
delete m_pLabel0;
if(m_pLabel1)
delete m_pLabel1;
+ bool bShowImages = KVI_OPTION_BOOL(KviOption_boolIrcViewShowImages);
+
if(bShowImages)
{
m_pLabel0 = new QLabel(this);