From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * 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 --- certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp') 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 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 ) -- cgit v1.2.1