Commit 380f1593 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Use namespace QGpgME

parent 6da197f5
......@@ -27,6 +27,7 @@
#include <QTimeEdit>
using namespace Kleo;
using namespace QGpgME;
#if 0 // disabled, since it is apparently confusing
// For sync'ing kabldaprc
......@@ -199,10 +200,10 @@ void DirectoryServicesConfigurationPage::load()
// gpgsm/Configuration/keyserver is not provided by older gpgconf versions;
if ((mX509ServicesEntry = configEntry(s_x509services_new_componentName, s_x509services_new_groupName, s_x509services_new_entryName,
QGpgME::CryptoConfigEntry::ArgType_LDAPURL, ListValue, DoNotShowError))) {
CryptoConfigEntry::ArgType_LDAPURL, ListValue, DoNotShowError))) {
mWidget->addX509Services(mX509ServicesEntry->urlValueList());
} else if ((mX509ServicesEntry = configEntry(s_x509services_componentName, s_x509services_groupName, s_x509services_entryName,
QGpgME::CryptoConfigEntry::ArgType_LDAPURL, ListValue, DoShowError))) {
CryptoConfigEntry::ArgType_LDAPURL, ListValue, DoShowError))) {
mWidget->addX509Services(mX509ServicesEntry->urlValueList());
}
......@@ -210,9 +211,9 @@ void DirectoryServicesConfigurationPage::load()
{
auto *const newEntry = configEntry(s_pgpservice_componentName, s_pgpservice_groupName, s_pgpservice_entryName,
QGpgME::CryptoConfigEntry::ArgType_String, SingleValue, DoNotShowError);
CryptoConfigEntry::ArgType_String, SingleValue, DoNotShowError);
auto *const legacyEntry = configEntry(s_pgpservice_legacy_componentName, s_pgpservice_legacy_groupName, s_pgpservice_legacy_entryName,
QGpgME::CryptoConfigEntry::ArgType_String, SingleValue, DoNotShowError);
CryptoConfigEntry::ArgType_String, SingleValue, DoNotShowError);
mOpenPGPServiceEntry = newEntry ? newEntry : legacyEntry;
QString stringValue;
......@@ -248,14 +249,14 @@ void DirectoryServicesConfigurationPage::load()
readOnlyProtocols = DirectoryServicesWidget::X509Protocol;
}
mTimeoutConfigEntry = configEntry(s_timeout_componentName, s_timeout_groupName, s_timeout_entryName, QGpgME::CryptoConfigEntry::ArgType_UInt, SingleValue, DoShowError);
mTimeoutConfigEntry = configEntry(s_timeout_componentName, s_timeout_groupName, s_timeout_entryName, CryptoConfigEntry::ArgType_UInt, SingleValue, DoShowError);
if (mTimeoutConfigEntry) {
QTime time = QTime(0, 0, 0, 0).addSecs(mTimeoutConfigEntry->uintValue());
//qCDebug(KLEOPATRA_LOG) <<"timeout:" << mTimeoutConfigEntry->uintValue() <<" ->" << time;
mTimeout->setTime(time);
}
mMaxItemsConfigEntry = configEntry(s_maxitems_componentName, s_maxitems_groupName, s_maxitems_entryName, QGpgME::CryptoConfigEntry::ArgType_UInt, SingleValue, DoShowError);
mMaxItemsConfigEntry = configEntry(s_maxitems_componentName, s_maxitems_groupName, s_maxitems_entryName, CryptoConfigEntry::ArgType_UInt, SingleValue, DoShowError);
if (mMaxItemsConfigEntry) {
mMaxItems->blockSignals(true); // KNumInput emits valueChanged from setValue!
mMaxItems->setValue(mMaxItemsConfigEntry->uintValue());
......@@ -266,7 +267,7 @@ void DirectoryServicesConfigurationPage::load()
mMaxItemsLabel->setEnabled(maxItemsEnabled);
#ifdef NOT_USEFUL_CURRENTLY
mAddNewServersConfigEntry = configEntry(s_addnewservers_componentName, s_addnewservers_groupName, s_addnewservers_entryName, QGpgME::CryptoConfigEntry::ArgType_None, SingleValue, DoShowError);
mAddNewServersConfigEntry = configEntry(s_addnewservers_componentName, s_addnewservers_groupName, s_addnewservers_entryName, CryptoConfigEntry::ArgType_None, SingleValue, DoShowError);
if (mAddNewServersConfigEntry) {
mAddNewServersCB->setChecked(mAddNewServersConfigEntry->boolValue());
}
......@@ -362,14 +363,14 @@ extern "C"
}
// Find config entry for ldap servers. Implements runtime checks on the configuration option.
QGpgME::CryptoConfigEntry *DirectoryServicesConfigurationPage::configEntry(const char *componentName,
CryptoConfigEntry *DirectoryServicesConfigurationPage::configEntry(const char *componentName,
const char *groupName,
const char *entryName,
QGpgME::CryptoConfigEntry::ArgType argType,
CryptoConfigEntry::ArgType argType,
EntryMultiplicity multiplicity,
ShowError showError)
{
QGpgME::CryptoConfigEntry *entry = mConfig->entry(QLatin1String(componentName), QLatin1String(groupName), QLatin1String(entryName));
CryptoConfigEntry *entry = mConfig->entry(QLatin1String(componentName), QLatin1String(groupName), QLatin1String(entryName));
if (!entry) {
if (showError == DoShowError) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment