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
+7 -4
View File
@@ -23,7 +23,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
auto words = new QList<Word>(); auto words = new QList<Word>();
// timestamps // timestamps
iterator = ircMessage.tags().find("tmi-sent-ts"); auto iterator = ircMessage.tags().find("tmi-sent-ts");
time_t time = std::time(NULL); time_t time = std::time(NULL);
if (iterator != ircMessage.tags().end()) 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)); strftime(timeStampBuffer, 69, "%H:%M:%S", localtime(&time));
QString timestampWithSeconds = QString(timeStampBuffer); QString timestampWithSeconds = QString(timeStampBuffer);
words->append(new Word(timestamp, Word::TimestampNoSeconds)); QString copytext("");
words->append(new Word(timestampWithSeconds, Word::TimestampWithSeconds)); QString tooltip("");
// words->append(*new Word(timestamp, Word::TimestampNoSeconds, copytext, tooltip));
// words->append(*new Word(timestampWithSeconds, Word::TimestampWithSeconds, copytext, tooltip));
// username // username
m_userName = ircMessage.account(); m_userName = ircMessage.account();
@@ -58,7 +61,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
// display name // display name
QString displayName; QString displayName;
auto iterator = ircMessage.tags().find("display-name"); iterator = ircMessage.tags().find("display-name");
if (iterator == ircMessage.tags().end()) { if (iterator == ircMessage.tags().end()) {
displayName = m_userName; displayName = m_userName;
} }
+1
View File
@@ -22,6 +22,7 @@ Word::Word(const QString& text, Type type, const QString& copytext, const QStrin
Word::~Word() Word::~Word()
{ {
delete text;
delete m_copyText; delete m_copyText;
delete m_tooltip; delete m_tooltip;
} }
+2 -2
View File
@@ -77,8 +77,8 @@ public:
return m_isImage; return m_isImage;
} }
QString* copyText() { QString& copyText() {
return m_copyText; return *m_copyText;
} }
bool hasTrailingSpace() { bool hasTrailingSpace() {