diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-08-13 10:47:50 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-08-13 10:48:53 -0500 |
| commit | e88f885a9f69909bd759b8cc81e089f85ee58930 (patch) | |
| tree | f8358f05bef0bb93b2ef132774fc7b31250dcb46 /src/chatlogpiece.cpp | |
| parent | 593e9d7353f601f81bbe26925ace4966434e7370 (diff) | |
| parent | ec1c95bdb33dd063880c4cb6c3c9c3cf5d0ed454 (diff) | |
Merge master with some older CI changes
Diffstat (limited to 'src/chatlogpiece.cpp')
| -rw-r--r-- | src/chatlogpiece.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/chatlogpiece.cpp b/src/chatlogpiece.cpp index 9017b961..2a041f13 100644 --- a/src/chatlogpiece.cpp +++ b/src/chatlogpiece.cpp @@ -2,11 +2,11 @@ chatlogpiece::chatlogpiece() { - name = "UNKNOWN"; - showname = "UNKNOWN"; - message = "UNKNOWN"; + name = tr("UNKNOWN"); + showname = tr("UNKNOWN"); + message = tr("UNKNOWN"); color = 0; - is_song = false; + p_is_song = false; datetime = QDateTime::currentDateTime().toUTC(); } @@ -16,7 +16,7 @@ chatlogpiece::chatlogpiece(QString p_name, QString p_showname, name = p_name; showname = p_showname; message = p_message; - is_song = p_song; + p_is_song = p_song; color = p_color; datetime = QDateTime::currentDateTime().toUTC(); } @@ -28,7 +28,7 @@ chatlogpiece::chatlogpiece(QString p_name, QString p_showname, name = p_name; showname = p_showname; message = p_message; - is_song = p_song; + p_is_song = p_song; color = p_color; datetime = p_datetime.toUTC(); } @@ -41,9 +41,10 @@ QString chatlogpiece::get_message() { return message; } QDateTime chatlogpiece::get_datetime() { return datetime; } -bool chatlogpiece::get_is_song() { return is_song; } +bool chatlogpiece::is_song() { return p_is_song; } QString chatlogpiece::get_datetime_as_string() { return datetime.toString(); } + int chatlogpiece::get_chat_color() { return color; } QString chatlogpiece::get_full() @@ -51,13 +52,15 @@ QString chatlogpiece::get_full() QString full = "["; full.append(get_datetime_as_string()); - full.append(" UTC] "); + full.append("] "); full.append(get_showname()); full.append(" ("); full.append(get_name()); full.append(")"); - if (is_song) - full.append(" has played a song: "); + if (p_is_song) + full.append(tr(" has played a song: ")); + else + full.append(": "); full.append(get_message()); return full; |
