[svn] pinentry - r190 - in trunk: . qt qt4

svn author wk cvs at cvs.gnupg.org
Mon Dec 8 17:45:52 CET 2008


Author: wk
Date: 2008-12-08 17:45:52 +0100 (Mon, 08 Dec 2008)
New Revision: 190

Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/qt/main.cpp
   trunk/qt4/main.cpp
Log:
Fix utf-8 problem.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-11-12 11:21:39 UTC (rev 189)
+++ trunk/ChangeLog	2008-12-08 16:45:52 UTC (rev 190)
@@ -1,3 +1,8 @@
+2008-12-08  Werner Koch  <wk at g10code.com>
+
+	* qt/main.cpp (qt_cmd_handler) <!want_pass>: Translate from utf8.
+	* qt4/main.cpp (qt_cmd_handler) <!want_pass>: Translate from utf8.
+
 2008-11-12  Ludovic Rousseau <ludovic.rousseau at gmail.com>  (wk)
 
 	* pinentry/pinentry.h (struct pinentry): Add field TITLE.

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2008-11-12 11:21:39 UTC (rev 189)
+++ trunk/NEWS	2008-12-08 16:45:52 UTC (rev 190)
@@ -5,6 +5,9 @@
 
  * Add Qt4 pinentry.
 
+ * Fix utf-8 problem in Qt pinentries.
+
+
 Noteworthy changes in version 0.7.5 (2008-02-15)
 ------------------------------------------------
 

Modified: trunk/qt/main.cpp
===================================================================
--- trunk/qt/main.cpp	2008-11-12 11:21:39 UTC (rev 189)
+++ trunk/qt/main.cpp	2008-12-08 16:45:52 UTC (rev 190)
@@ -113,9 +113,13 @@
     }
   else
     {
-      bool ret = QMessageBox::information (parent, "", pe->description,
-					   pe->ok ? pe->ok : "OK",
-					   pe->cancel ? pe->cancel : "Cancel");
+      QString desc = QString::fromUtf8 (pe->description? pe->description :"");
+      QString ok   = QString::fromUtf8 (pe->ok ? pe->ok : "OK");
+      QString can  = QString::fromUtf8 (pe->cancel ? pe->cancel : "Cancel");
+      bool ret;
+      
+      ret = QMessageBox::information (parent, "", desc, ok, can );
+      
       return !ret;
     }
 }

Modified: trunk/qt4/main.cpp
===================================================================
--- trunk/qt4/main.cpp	2008-11-12 11:21:39 UTC (rev 189)
+++ trunk/qt4/main.cpp	2008-12-08 16:45:52 UTC (rev 190)
@@ -118,9 +118,13 @@
     }
   else
     {
-      bool ret = QMessageBox::information (parent, "", pe->description,
-					   pe->ok ? pe->ok : "OK",
-					   pe->cancel ? pe->cancel : "Cancel");
+      QString desc = QString::fromUtf8 (pe->description? pe->description :"");
+      QString ok   = QString::fromUtf8 (pe->ok ? pe->ok : "OK");
+      QString can  = QString::fromUtf8 (pe->cancel ? pe->cancel : "Cancel");
+      bool ret;
+      
+      ret = QMessageBox::information (parent, "", desc, ok, can );
+      
       return !ret;
     }
 }




More information about the Gnupg-commits mailing list