diff options
Diffstat (limited to 'src/modules/notifier/NotifierMessage.cpp')
| -rw-r--r-- | src/modules/notifier/NotifierMessage.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/modules/notifier/NotifierMessage.cpp b/src/modules/notifier/NotifierMessage.cpp index b0a6e401b..6e9018a0d 100644 --- a/src/modules/notifier/NotifierMessage.cpp +++ b/src/modules/notifier/NotifierMessage.cpp @@ -31,19 +31,12 @@ #include <QRect> #include <QResizeEvent> +#include <utility> -NotifierMessage::NotifierMessage(QPixmap * pPixmap, const QString & szText) +NotifierMessage::NotifierMessage(QPixmap * pPixmap, QString szText) + : m_szText{ std::move(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 +56,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); |
