[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/libkleo/backends/qgpgme
From:       Marc Mutz <mutz () kde ! org>
Date:       2008-02-06 10:54:35
Message-ID: 1202295275.235105.10953.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 771539 by mutz:

Use gpgConfPath() everywhere. Fixes i16.


 M  +12 -4     qgpgmecryptoconfig.cpp  


--- trunk/KDE/kdepim/libkleo/backends/qgpgme/qgpgmecryptoconfig.cpp #771538:771539
@@ -191,10 +191,15 @@
 
 void QGpgMECryptoConfigComponent::runGpgConf()
 {
+  const QString gpgconf = QGpgMECryptoConfig::gpgConfPath();
+  if ( gpgconf.isEmpty() ) {
+      kWarning(5150) << "Can't get path to gpgconf executable...";
+      return;
+  }
+
   // Run gpgconf --list-options <component>, and create all groups and entries for \
                that component
-
   KProcess proc;
-  proc << "gpgconf"; // must be in the PATH
+  proc << gpgconf;
   proc << "--list-options";
   proc << mName;
 
@@ -317,7 +322,10 @@
     return;
 
   // Call gpgconf --change-options <component>
-  QString commandLine = "gpgconf";
+  const QString gpgconf = QGpgMECryptoConfig::gpgConfPath();
+  QString commandLine = gpgconf.isEmpty()
+      ? QString::fromLatin1( "gpgconf" )
+      : KShell::quoteArg( gpgconf ) ;
   if ( runtime )
     commandLine += " --runtime";
   commandLine += " --change-options ";
@@ -336,7 +344,7 @@
 
   if ( rc == -2 )
   {
-    QString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH \
and that it can be started" ); +    QString wmsg = i18n( "Could not start \
gpgconf.\nCheck that gpgconf is in the PATH and that it can be started." );  \
kWarning(5150) << wmsg;  KMessageBox::error(0, wmsg);
   }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic