File pinentry-0.7.2-qt-utf8.diff of Package pinentry

diff -ur pinentry-orig/qt/main.cpp pinentry-0.7.2/qt/main.cpp
--- pinentry-orig/qt/main.cpp	2004-02-23 21:01:13.000000000 +0100
+++ pinentry-0.7.2/qt/main.cpp	2007-09-10 14:34:35.000000000 +0200
@@ -70,19 +70,19 @@
 
       PinEntryDialog pinentry (parent, 0, true);
 
-      pinentry.setPrompt (QString::fromUtf8 (pe->prompt));
-      pinentry.setDescription (QString::fromUtf8 (pe->description));
+      pinentry.setPrompt (QString::fromLocal8Bit (pe->prompt));
+      pinentry.setDescription (QString::fromLocal8Bit (pe->description));
       /* If we reuse the same dialog window.  */
 #if 0
       pinentry.setText (SecQString::null);
 #endif
 
       if (pe->ok)
-	pinentry.setOkText (QString::fromUtf8 (pe->ok));
+	pinentry.setOkText (QString::fromLocal8Bit (pe->ok));
       if (pe->cancel)
-	pinentry.setCancelText (QString::fromUtf8 (pe->cancel));
+	pinentry.setCancelText (QString::fromLocal8Bit (pe->cancel));
       if (pe->error)
-	pinentry.setError (QString::fromUtf8 (pe->error));
+	pinentry.setError (QString::fromLocal8Bit (pe->error));
 
       bool ret = pinentry.exec ();
       if (!ret)
@@ -108,9 +108,9 @@
     }
   else
     {
-      bool ret = QMessageBox::information (parent, "", pe->description,
-					   pe->ok ? pe->ok : "OK",
-					   pe->cancel ? pe->cancel : "Cancel");
+      bool ret = QMessageBox::information (parent, "", QString::fromLocal8Bit(pe->description),
+					   pe->ok ? QString::fromLocal8Bit(pe->ok) : "OK",
+					   pe->cancel ? QString::fromLocal8Bit(pe->cancel) : "Cancel");
       return !ret;
     }
 }
openSUSE Build Service is sponsored by