All pastes #1919413 Raw Edit

kdepimlibs patch

public text v1 · immutable
#1919413 ·published 2010-08-18 12:49 UTC
rendered paste body
Index: qgpgme/tests/editinteractortest.cpp
===================================================================
--- qgpgme/tests/editinteractortest.cpp	(revision 1156175)
+++ qgpgme/tests/editinteractortest.cpp	(working copy)
@@ -265,12 +265,12 @@
                 return 1;
 
             if ( Error err = kl->startKeyListing( keyid ) )
-                throw std::runtime_error( std::string( "startKeyListing: " ) + gpg_strerror( err.encodedError() ) );
+                throw std::runtime_error( std::string( "startKeyListing: " ) + gpgme_strerror( err.encodedError() ) );
 
             Error err;
             key = kl->nextKey( err );
             if ( err )
-                throw std::runtime_error( std::string( "nextKey: " ) + gpg_strerror( err.encodedError() ) );
+                throw std::runtime_error( std::string( "nextKey: " ) + gpgme_strerror( err.encodedError() ) );
 
             (void)kl->endKeyListing();
         }
@@ -289,7 +289,7 @@
             std::auto_ptr<EditInteractor> ei( iei );
             ei->setDebugChannel( stderr );
             if ( Error err = ctx->startEditing( key, ei, data ) )
-                throw std::runtime_error( std::string( "startEditing: " ) + gpg_strerror( err.encodedError() ) );
+                throw std::runtime_error( std::string( "startEditing: " ) + gpgme_strerror( err.encodedError() ) );
             // ei released in passing to startEditing
         }
 
Index: qgpgme/tests/installtest.cpp
===================================================================
--- qgpgme/tests/installtest.cpp	(revision 1156175)
+++ qgpgme/tests/installtest.cpp	(working copy)
@@ -69,8 +69,8 @@
 
 int main( int, char** ) {
 
-  printf( "GPGME_PROTOCOL_CMS: %s\n", gpg_strerror( gpgme_engine_check_version( GPGME_PROTOCOL_CMS ) ) );
-  printf( "GPGME_PROTOCOL_OpenPGP: %s\n", gpg_strerror( gpgme_engine_check_version( GPGME_PROTOCOL_OpenPGP ) )); 
+  printf( "GPGME_PROTOCOL_CMS: %s\n", gpgme_strerror( gpgme_engine_check_version( GPGME_PROTOCOL_CMS ) ) );
+  printf( "GPGME_PROTOCOL_OpenPGP: %s\n", gpgme_strerror( gpgme_engine_check_version( GPGME_PROTOCOL_OpenPGP ) )); 
   gpgme_engine_info_t ei = 0;
   if ( gpgme_get_engine_info( &ei ) )
     printf("error not engine info found \n");
Index: gpgme++/exception.cpp
===================================================================
--- gpgme++/exception.cpp	(revision 1156175)
+++ gpgme++/exception.cpp	(working copy)
@@ -43,10 +43,10 @@
         return msg;
     char error_string[128];
     error_string[0] = '\0';
-    gpg_strerror_r( err.encodedError(), error_string, sizeof error_string );
+    gpgme_strerror_r( err.encodedError(), error_string, sizeof error_string );
     error_string[sizeof error_string - 1] = '\0';
     stringstream ss;
-    ss << gpg_strsource( err.encodedError() ) << ": ";
+    ss << gpgme_strsource( err.encodedError() ) << ": ";
     if ( !msg.empty() )
         ss << msg << ": ";
     ss << error_string << " (" << static_cast<unsigned long>( err.encodedError() ) << ')';
Index: gpgme++/callbacks.cpp
===================================================================
--- gpgme++/callbacks.cpp	(revision 1156175)
+++ gpgme++/callbacks.cpp	(working copy)
@@ -36,7 +36,7 @@
 #include <stdlib.h>
 
 static inline gpg_error_t makeErrorFromErrno() {
-  return gpg_err_make_from_errno( (gpg_err_source_t)22, errno );
+  return gpg_err_make( (gpg_err_source_t)22, gpgme_err_code_from_errno (errno) );
 }
 static inline gpg_error_t makeError( gpg_err_code_t code ) {
   return gpg_err_make( (gpg_err_source_t)22, code );
Index: gpgme++/editinteractor.cpp
===================================================================
--- gpgme++/editinteractor.cpp	(revision 1156175)
+++ gpgme++/editinteractor.cpp	(working copy)
@@ -110,7 +110,7 @@
                         errno = 0;
                         const ssize_t len = std::strlen( result );
                         if ( writeAll( fd, result, len ) != len ) {
-                            err = Error( gpg_error_from_syserror() );
+                            err = Error( gpg_error( gpgme_err_code_from_syserror() ) );
                             if ( ei->debug )
                                 std::fprintf( ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, strerror( errno ) );
                             goto error;
@@ -118,7 +118,7 @@
                     }
                     errno = 0;
                     if ( writeAll( fd, "\n", 1 ) != 1 ) {
-                        err = Error( gpg_error_from_syserror() );
+                        err = Error( gpg_error( gpgme_err_code_from_syserror() ) );
                         if ( ei->debug )
                             std::fprintf( ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, strerror( errno ) );
                         goto error;
@@ -144,7 +144,7 @@
 
         if ( ei->debug )
             std::fprintf( ei->debug, "EditInteractor: error now %u (%s)\n",
-                          ei->error.encodedError(), gpg_strerror( ei->error.encodedError() ) );
+                          ei->error.encodedError(), gpgme_strerror( ei->error.encodedError() ) );
 
         return ei->error.encodedError();
     }