[git] GPGME - branch, master, updated. gpgme-1.11.1-3-g6b267c5

by Andre Heinecke cvs at cvs.gnupg.org
Thu Apr 26 14:12:48 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  6b267c56fd6e54fb1c254455c04495534260b547 (commit)
      from  7706fa2c922f5e02570b01f145ed474e82341042 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6b267c56fd6e54fb1c254455c04495534260b547
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Apr 26 14:11:19 2018 +0200

    qt: Fix filename handling in cryptoconfig
    
    * src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigEntry::urlValue):
    Build url from local file.
    (QGpgMENewCryptoConfigEntry::setURLValue): Set native seperated
    path.
    
    --
    This fixes setting files through cryptoconfig on Windows.
    GnuPG-Bug-Id: T3939

diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
index ba028a9..070ab69 100644
--- a/lang/qt/src/qgpgmenewcryptoconfig.cpp
+++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp
@@ -42,6 +42,7 @@
 #include "gpgme_backend_debug.h"
 
 #include <QFile>
+#include <QDir>
 
 #include "global.h"
 #include "error.h"
@@ -521,8 +522,7 @@ QUrl QGpgMENewCryptoConfigEntry::urlValue() const
     Q_ASSERT(type == FilenameType || type == LdapServerType);
     Q_ASSERT(!isList());
     if (type == FilenameType) {
-        QUrl url;
-        url.setPath(QFile::decodeName(m_option.currentValue().stringValue()));
+        QUrl url = QUrl::fromLocalFile(m_option.currentValue().stringValue());
         return url;
     }
     return parseURL(type, stringValue());
@@ -635,7 +635,7 @@ void QGpgMENewCryptoConfigEntry::setURLValue(const QUrl &url)
     if (str.isEmpty() && !isOptional()) {
         m_option.resetToDefaultValue();
     } else if (type == FilenameType) {
-        m_option.setNewValue(m_option.createStringArgument(QFile::encodeName(str).constData()));
+        m_option.setNewValue(m_option.createStringArgument(QDir::toNativeSeparators(url.toLocalFile()).toUtf8().constData()));
     } else {
         m_option.setNewValue(m_option.createStringArgument(str.toUtf8().constData()));
     }

-----------------------------------------------------------------------

Summary of changes:
 lang/qt/src/qgpgmenewcryptoconfig.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list