Translate \n into <br/> for error messages

This way we can display the error message like it was meant to be read.

REVIEW: 108123
This commit is contained in:
Aleix Pol 2013-01-10 04:54:31 +01:00
parent 362ba9245c
commit 463d467f85

View File

@ -2973,7 +2973,9 @@ QString AppletPrivate::visibleFailureText(const QString &reason)
if (reason.isEmpty()) {
text = i18n("This object could not be created.");
} else {
text = i18n("This object could not be created for the following reason:<p><b>%1</b></p>", reason);
QString r = reason;
r.replace('\n', "<br/>");
text = i18n("This object could not be created for the following reason:<p><b>%1</b></p>", r);
}
return text;