[vlc-commits] Qt4: retain newlines in config item long text
Rémi Denis-Courmont
git at videolan.org
Tue Aug 16 19:20:45 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 16 20:20:21 2011 +0300| [b9132e4ff8d54e83b4a573be6ba4029d34a0daea] | committer: Rémi Denis-Courmont
Qt4: retain newlines in config item long text
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9132e4ff8d54e83b4a573be6ba4029d34a0daea
---
modules/gui/qt4/components/preferences_widgets.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index efe8593..aa771e7 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -58,6 +58,9 @@
QString formatTooltip(const QString & tooltip)
{
+ QString text = tooltip;
+ text.replace("\n", "<br/>");
+
QString formatted =
"<html><head><meta name=\"qrichtext\" content=\"1\" />"
"<style type=\"text/css\"> p, li { white-space: pre-wrap; } </style></head>"
@@ -65,8 +68,7 @@ QString formatTooltip(const QString & tooltip)
"font-style:normal; text-decoration:none;\">"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; "
"margin-right:0px; -qt-block-indent:0; text-indent:0px;\">" +
- tooltip +
- "</p></body></html>";
+ text + "</p></body></html>";
return formatted;
}
More information about the vlc-commits
mailing list