1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 11:19:18 +01:00

Treat \r and \n in comment fields as newlines

This commit is contained in:
David Sansome 2010-12-05 13:41:40 +00:00
parent cef02b4f61
commit 4c72ef4177

View File

@ -214,6 +214,9 @@ bool PlaylistDelegateBase::helpEvent(QHelpEvent *event, QAbstractItemView *view,
// Special case: we want newlines in the comment tooltip
if (index.column() == Playlist::Column_Comment) {
text = Qt::escape(index.data(Qt::ToolTipRole).toString());
text.replace("\\r\\n", "<br />");
text.replace("\\n", "<br />");
text.replace("\r\n", "<br />");
text.replace("\n", "<br />");
}