Version: (using KDE 4.1.3) Compiler: GNU gcc 4.3.2 OS: Solaris Installed from: Compiled From Sources When compiling kdepim-4.1.4 (with kdelibs-4.1.4) I get the following error: [ 47%] Building CXX object kmail/CMakeFiles/kmailprivate.dir/kmstartup.o /opt/kde4/include/conversion_check.h: In member function 'void ConversionCheck::type_toQVariant<T>::constraint() [with T = long int]': /opt/kde4/include/conversion_check.h:78: instantiated from 'void ConversionCheck::to_QVariant() [with T = long int]' /opt/kde4/include/kconfiggroup.h:673: instantiated from 'void KConfigGroup::writeCheck(const char*, const T&, QFlags<KConfigBase::WriteConfigFlag>) [with T = long int]' /opt/kde4/include/kconfiggroup.h:374: instantiated from 'void KConfigGroup::writeEntry(const char*, const T&, QFlags<KConfigBase::WriteConfigFlag>) [with T = pid_t]' /home/unix/kdepim-4.1.4/kmail/kmstartup.cpp:234: instantiated from here /opt/kde4/include/conversion_check.h:60: error: conversion from 'ConversionCheck::unsupported' to non-scalar type 'Conver sionCheck::supported' requested I got around this error by adding the following line: QVConversions(long int, supported, supported); to the file include/conversion_check.h (this file from kdelibs-4.1.4) OS: SunOS 5.11 snv_104 i86pc i386 i86pc Solaris compiler: gcc 4.3.2 linker: GNU ld (GNU Binutils) 2.18
There's two ways to go about this; either adding a conversion for long (int and long long are supported already) or casting the result of getpid() to long long. The definition of pid_t is conditional on #if defined(_LP64) || defined(_I32LPx). I think the first thing to check is if long *is* supported by QVariant and just isn';t listed by accident - then we can fix the conversions header. The KDE4-Solaris team has hit this problem previously and has picked (long long) cast as the easy fix up until now.
qvariant does not support long, as it would cause ambiguities. fix with a cast in kmail.
has this been taken care of by now? can we close?
SVN commit 981380 by winterz: cast getpid() to a qlonglong so we don't rely on a system include to give us a type that QVariant can't handle. Should fix compile problems on systems where getpid() is a long. BUG: 180954 M +3 -2 kmstartup.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=981380