mirror-chatterino2/messages/word.cpp
Rasmus Karlsson 46f432890f Simple logging implemented
Message now stores a copy of the content string
Use .nick() instead of .account() to get the users lowercase name (login name)
2017-03-11 11:38:47 +01:00

39 lines
845 B
C++

#include "messages/word.h"
namespace chatterino {
namespace messages {
// Image word
Word::Word(LazyLoadedImage *image, Type type, const QString &copytext,
const QString &tooltip, const Link &link)
: image(image)
, text()
, color()
, _isImage(true)
, type(type)
, copyText(copytext)
, tooltip(tooltip)
, link(link)
, characterWidthCache()
{
image->getWidth(); // professional segfault test
}
// Text word
Word::Word(const QString &text, Type type, const QColor &color,
const QString &copytext, const QString &tooltip, const Link &link)
: image(NULL)
, text(text)
, color(color)
, _isImage(false)
, type(type)
, copyText(copytext)
, tooltip(tooltip)
, link(link)
, characterWidthCache()
{
}
} // namespace messages
} // namespace chatterino