|
|
|
@ -106,7 +106,7 @@ IIRCView::IIRCView() |
|
|
|
|
connect(this, &QTextBrowser::customContextMenuRequested, this, &IIRCView::customContextMenuRequested); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void IIRCView::print(const PrintType ptype, const QString& text) |
|
|
|
|
void IIRCView::print(const QDateTime& timestamp, const PrintType ptype, const QString& text) |
|
|
|
|
{ |
|
|
|
|
QString textFormatted = stripTags(text); |
|
|
|
|
QString styleclass = typeToString(ptype, "Normal"); |
|
|
|
@ -114,8 +114,7 @@ void IIRCView::print(const PrintType ptype, const QString& text) |
|
|
|
|
|
|
|
|
|
ConfigMgr& conf = ConfigMgr::instance(); |
|
|
|
|
if (conf.common("ShowTimestamp") == "1" && !conf.common("TimestampFormat").isEmpty()) { |
|
|
|
|
QDateTime dt = QDateTime::currentDateTime(); |
|
|
|
|
QString ts = dt.toString(conf.common("TimestampFormat")) + " "; |
|
|
|
|
QString ts = timestamp.toString(conf.common("TimestampFormat")) + " "; |
|
|
|
|
textFormatted.prepend(ts); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|