summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp')
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
index c67800502..ae45d6833 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
@@ -447,6 +447,13 @@ TQVariant QGpgMECryptoConfigEntry::stringToValue( const TQString& str, bool unes
bool isString = isStringType();
if ( isList() ) {
+ if ( argType() == ArgType_None ) {
+ bool ok = true;
+ const TQVariant v = str.isEmpty() ? 0U : str.toUInt( &ok ) ;
+ if ( !ok )
+ kdWarning(5150) << "list-of-none should have an unsigned int as value:" << str << endl;
+ return v;
+ }
TQValueList<TQVariant> lst;
TQStringList items = TQStringList::split( ',', str );
for( TQStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) {
@@ -657,7 +664,10 @@ void QGpgMECryptoConfigEntry::resetToDefault()
if ( mFlags & GPGCONF_FLAG_DEFAULT )
mValue = mDefaultValue;
else if ( mArgType == ArgType_None )
- mValue = false;
+ if ( isList() )
+ mValue = 0U;
+ else
+ mValue = false;
}
void QGpgMECryptoConfigEntry::setBoolValue( bool b )
@@ -715,7 +725,9 @@ void QGpgMECryptoConfigEntry::setNumberOfTimesSet( unsigned int i )
{
Q_ASSERT( mArgType == ArgType_None );
Q_ASSERT( isList() );
- setUIntValue( i );
+ mValue = i;
+ mSet = i > 0;
+ mDirty = true;
}
void QGpgMECryptoConfigEntry::setStringValueList( const TQStringList& lst )