qt: Write path values with Unix directory separators

* lang/qt/src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfigEntry::setURLValue): Remove conversion to native
directory separators.
--

Even on Windows Unix directory separators work with all API calls. And
some path values also allow "URLs" like tcp://1.2.3.4:10001 which must
use '/'.

GnuPG-bug-id: 4518
This commit is contained in:
Ingo Klöcker 2022-12-06 07:56:12 +01:00
parent a9921d797b
commit d04d7b174f
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9

View File

@ -644,7 +644,7 @@ void QGpgMENewCryptoConfigEntry::setURLValue(const QUrl &url)
if (str.isEmpty() && !isOptional()) { if (str.isEmpty() && !isOptional()) {
m_option.resetToDefaultValue(); m_option.resetToDefaultValue();
} else if (type == FilenameType) { } else if (type == FilenameType) {
m_option.setNewValue(m_option.createStringArgument(QDir::toNativeSeparators(url.toLocalFile()).toUtf8().constData())); m_option.setNewValue(m_option.createStringArgument(url.toLocalFile().toUtf8().constData()));
} else { } else {
m_option.setNewValue(m_option.createStringArgument(str.toUtf8().constData())); m_option.setNewValue(m_option.createStringArgument(str.toUtf8().constData()));
} }