[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kde4/kdelibs/kdecore
From:       Wilco Greven <greven () kde ! org>
Date:       2005-05-30 11:04:34
Message-ID: 1117451074.856473.19431.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 419701 by wgreven:

Qt4 doesn't convert from QVariant::Invalid to QVariant::StringList type 
anymore. Fixes reading of e.g. stringlist entries.


 M  +4 -4      kconfigbase.cpp  


--- branches/work/kde4/kdelibs/kdecore/kconfigbase.cpp #419700:419701
@@ -341,10 +341,10 @@
 QVariant KConfigBase::readPropertyEntry( const char *pKey,
                                           QVariant::Type type ) const
 {
-  QVariant va;
-  if ( !hasKey( pKey ) ) return va;
-  (void)va.cast(type);
-  return readPropertyEntry(pKey, va);
+  if ( !hasKey( pKey ) ) 
+    return QVariant();
+  else
+    return readPropertyEntry(pKey, QVariant(type));
 }
 
 QVariant KConfigBase::readPropertyEntry( const QString& pKey,
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic