Change default parameter to be QDateTime::currentDateTime()
Print debug message if provided timestamp is invalid
This commit is contained in:
parent
6570bcf066
commit
8aaba6633e
@ -225,7 +225,7 @@ public:
|
|||||||
// selected
|
// selected
|
||||||
// or the user isn't already scrolled to the top
|
// or the user isn't already scrolled to the top
|
||||||
void append_ic_text(QString p_text, QString p_name = "", QString action = "",
|
void append_ic_text(QString p_text, QString p_name = "", QString action = "",
|
||||||
int color = 0, QDateTime timestamp = {});
|
int color = 0, QDateTime timestamp = QDateTime::currentDateTime());
|
||||||
|
|
||||||
// prints who played the song to IC chat and plays said song(if found on local
|
// prints who played the song to IC chat and plays said song(if found on local
|
||||||
// filesystem) takes in a list where the first element is the song name and
|
// filesystem) takes in a list where the first element is the song name and
|
||||||
|
@ -2650,8 +2650,7 @@ void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action,
|
|||||||
ui_ic_chatlog->textCursor().insertText(
|
ui_ic_chatlog->textCursor().insertText(
|
||||||
"[" + timestamp.toString("h:mm:ss AP") + "] ", normal);
|
"[" + timestamp.toString("h:mm:ss AP") + "] ", normal);
|
||||||
} else {
|
} else {
|
||||||
ui_ic_chatlog->textCursor().insertText(
|
qDebug() << "could not insert invalid timestamp";
|
||||||
"[" + QDateTime::currentDateTime().toString("h:mm:ss AP") + "] ", normal);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user