[patch] Re: kconfiggroup template 'mess'

Jarosław Staniek js at iidea.pl
Tue Oct 30 09:04:23 GMT 2007


Dirk Mueller said the following, On 2007-10-30 09:06:
> On Thursday 25 October 2007, Jaroslaw Staniek wrote:
> 
>> As Thiago and then I have mentioned - template/nontemplate versions of
>> function (here: readEntry/writeEntry) cannot be mixed. r721704 was a big
>> commit,
> 
> does it work if you remove one of the overload variants, e.g. the one 
> taking "const char*" as key or the one taking QString& as key?
> 
> the const char* / QByteArray ones are workarounds from older times where we 
> couldn't break source compatibility. 

Dirk,
I've just tried this, and we have ambiguousity:

[  0%] Building CXX object kdecore/CMakeFiles/kdecore.dir/config/kconfig.obj
kconfig.cpp
F:\kde4\trunk\KDE\kdelibs\kdecore\config\kconfig.cpp(287) : error C2668: 
'KConfigGroup::readEntry' : ambiguous call to o
verloaded function
         f:\kde4\trunk\KDE\kdelibs\kdecore\config\kconfiggroup.h(168): could 
be 'T KConfigGroup::readEntry<QStringList>(c
onst QString &,const T &) const'
         with
         [
             T=QStringList
         ]
         f:\kde4\trunk\KDE\kdelibs\kdecore\config\kconfiggroup.h(492): or 
   'QStringList KConfigGroup::readEntry<QStr
ingList>(const QByteArray &,const QStringList &) const'
         while trying to match the argument list '(const char [12], QStringList)'

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list