restable: cant use reslitdateformat which is html. Use setPlainText when displaying doc text in the detail area

This commit is contained in:
Jean-Francois Dockes 2021-03-23 09:14:15 +01:00
parent f45f5a0fd2
commit ce6c0edc91

View File

@ -220,7 +220,8 @@ static string datetimegetter(const string&, const Rcl::Doc& doc)
time_t mtime = doc.dmtime.empty() ?
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
datebuf = utf8datestring(prefs.reslistdateformat.c_str(), tm);
// Can't use reslistdateformat because it's html (  etc.)
datebuf = utf8datestring("%Y-%m-%d %H:%M:%S", tm);
}
return datebuf;
}
@ -899,7 +900,7 @@ void ResTable::onTableView_currentChanged(const QModelIndex& index)
m_rowchangefromkbd = false;
bool loadok = rcldb->getDocRawText(m_detaildoc);
if (loadok) {
m_detail->setText(u8s2qs(m_detaildoc.text));
m_detail->setPlainText(u8s2qs(m_detaildoc.text));
}
} else {
m_pager->displaySingleDoc(theconfig, m_detaildocnum, m_detaildoc,