From 5f5555f4d3c9a507bfc8fad9a008431257bd1ab3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 12 Jun 2012 13:08:43 +0200 Subject: Fix encoding of non-ASCII strings tr() only takes UTF-8 as input, so we must recode to UTF-8. But we can use QLatin1String elsewhere. Task-number: QTBUG-26086 Change-Id: I5932ddc96fb817dbe01106e5f6f2b10f58472d6b Reviewed-by: Eskil Abrahamsen Blomfeldt --- examples/painting/painterpaths/window.cpp | 2 +- examples/painting/transformations/window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/painting') diff --git a/examples/painting/painterpaths/window.cpp b/examples/painting/painterpaths/window.cpp index 65139fe5d1..3d3eef9d2b 100644 --- a/examples/painting/painterpaths/window.cpp +++ b/examples/painting/painterpaths/window.cpp @@ -184,7 +184,7 @@ Window::Window() rotationAngleSpinBox = new QSpinBox; rotationAngleSpinBox->setRange(0, 359); rotationAngleSpinBox->setWrapping(true); - rotationAngleSpinBox->setSuffix("\xB0"); + rotationAngleSpinBox->setSuffix(QLatin1String("\xB0")); rotationAngleLabel = new QLabel(tr("&Rotation Angle:")); rotationAngleLabel->setBuddy(rotationAngleSpinBox); diff --git a/examples/painting/transformations/window.cpp b/examples/painting/transformations/window.cpp index 76b7597c6c..5f9296be7f 100644 --- a/examples/painting/transformations/window.cpp +++ b/examples/painting/transformations/window.cpp @@ -64,7 +64,7 @@ Window::Window() operationComboBoxes[i] = new QComboBox; operationComboBoxes[i]->addItem(tr("No transformation")); - operationComboBoxes[i]->addItem(tr("Rotate by 60\xB0")); + operationComboBoxes[i]->addItem(tr("Rotate by 60\xC2\xB0")); operationComboBoxes[i]->addItem(tr("Scale to 75%")); operationComboBoxes[i]->addItem(tr("Translate by (50, 50)")); -- cgit v1.2.3