From kde-pim Fri May 19 23:01:21 2006 From: Ingo =?iso-8859-15?q?Kl=F6cker?= Date: Fri, 19 May 2006 23:01:21 +0000 To: kde-pim Subject: [Kde-pim] Rich text in label and status of ProgressItem Message-Id: <200605200101.35010 () erwin ! ingo-kloecker ! de> X-MARC-Message: https://marc.info/?l=kde-pim&m=114807970621423 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1874000544==" --===============1874000544== Content-Type: multipart/signed; boundary="nextPart1285733.VIEavedu5Z"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1285733.VIEavedu5Z Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, looking into bug 94243 and bug 127677 I noticed that rich text in label=20 and status of ProgressItems is interpreted (because we use QLabel for=20 them). The fix for bug 94243 escaped the message subject in order to=20 prevent it from being interpreted as rich text. Unfortunately, QLabel=20 fails to automatically detect text containing "&" as rich text and=20 thus prints "&" as is (leading to bug 127677). So we have to set=20 the text format of the QLabels explicitly with QLabel::setTextFormat().=20 Now the question is whether we want to set the text format to=20 Qt::PlainText or Qt::RichText. Do we want to be able to use rich text (e.g. ...) for the=20 label/status of ProgressItems? In this case all user text has to be=20 escaped before we put it into a label or a status. And this has to be=20 clearly documented in the API. Pro: Being able to use rich text might be nice in some situations. Con: This is error-prone because we will eventually forget to escape a=20 label/status text somewhere. Or will we never want to use rich text for the label/status of=20 ProgressItems? In this case we can simply disable rich text=20 interpretation by calling QLabel::setTextFormat( Qt::PlainText ). Pro: We don't have to remember to escape any label/status texts. Con: We can't use rich text. What do you think? Regards, Ingo --nextPart1285733.VIEavedu5Z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBEbk5OGnR+RTDgudgRAjjWAKCSflnwsl+l8rc9mHol6c9FkrzQYgCfY/HL E6+UsGOTrRgQAmIr3+X+0QE= =mzVy -----END PGP SIGNATURE----- --nextPart1285733.VIEavedu5Z-- --===============1874000544== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-pim mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/ --===============1874000544==--