ddddddddddddddddddddddddddddd

This commit is contained in:
fourtf 2017-01-05 16:22:55 +01:00
parent b7de109335
commit e68f885dff
3 changed files with 10 additions and 6 deletions

View file

@ -23,7 +23,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
auto words = new QList<Word>();
// timestamps
iterator = ircMessage.tags().find("tmi-sent-ts");
auto iterator = ircMessage.tags().find("tmi-sent-ts");
time_t time = std::time(NULL);
if (iterator != ircMessage.tags().end())
@ -39,8 +39,11 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
strftime(timeStampBuffer, 69, "%H:%M:%S", localtime(&time));
QString timestampWithSeconds = QString(timeStampBuffer);
words->append(new Word(timestamp, Word::TimestampNoSeconds));
words->append(new Word(timestampWithSeconds, Word::TimestampWithSeconds));
QString copytext("");
QString tooltip("");
// words->append(*new Word(timestamp, Word::TimestampNoSeconds, copytext, tooltip));
// words->append(*new Word(timestampWithSeconds, Word::TimestampWithSeconds, copytext, tooltip));
// username
m_userName = ircMessage.account();
@ -58,7 +61,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
// display name
QString displayName;
auto iterator = ircMessage.tags().find("display-name");
iterator = ircMessage.tags().find("display-name");
if (iterator == ircMessage.tags().end()) {
displayName = m_userName;
}

View file

@ -22,6 +22,7 @@ Word::Word(const QString& text, Type type, const QString& copytext, const QStrin
Word::~Word()
{
delete text;
delete m_copyText;
delete m_tooltip;
}

4
word.h
View file

@ -77,8 +77,8 @@ public:
return m_isImage;
}
QString* copyText() {
return m_copyText;
QString& copyText() {
return *m_copyText;
}
bool hasTrailingSpace() {