aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rwxr-xr-xlang/python/tests/t-callbacks.py2
-rw-r--r--lang/qt/Makefile.am8
-rw-r--r--lang/qt/src/qgpgmenewcryptoconfig.cpp6
3 files changed, 11 insertions, 5 deletions
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py
index 9a70cdae..b311e3d4 100755
--- a/lang/python/tests/t-callbacks.py
+++ b/lang/python/tests/t-callbacks.py
@@ -88,7 +88,7 @@ Name-Real: Joe Tester
Name-Comment: with stupid passphrase
Name-Email: [email protected]
Passphrase: Crypt0R0cks
-Expire-Date: 2020-12-31
+Expire-Date: 2099-12-31
</GnupgKeyParms>
"""
diff --git a/lang/qt/Makefile.am b/lang/qt/Makefile.am
index ab859609..a1b83e8d 100644
--- a/lang/qt/Makefile.am
+++ b/lang/qt/Makefile.am
@@ -19,6 +19,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA
-SUBDIRS = src tests doc
+if RUN_GPG_TESTS
+tests = tests
+else
+tests =
+endif
+
+SUBDIRS = src ${tests} doc
EXTRA_DIST = README
diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
index ba028a97..070ab697 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()));
}