Compile error in cvs HEAD

Adam Watson magius at warpdgfx.com
Fri Jan 3 20:43:05 UTC 2003


I received the following error during compile of the latest cvs download:

source='subclassingdlg.cpp' object='subclassingdlg.lo' libtool=yes \
depfile='.deps/subclassingdlg.Plo' tmpdepfile='.deps/subclassingdlg.TPlo' \
depmode=gcc /bin/sh ../../admin/depcomp \
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H 
-I. -I. -I../.. -I../../lib/interfaces -I../../lib/project 
-I../../lib/project -I../../lib/util -I/opt/kde/include -I/opt/kde/qt/include 
-I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith 
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE 
-Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -fno-common  -c 
-o subclassingdlg.lo `test -f 'subclassingdlg.cpp' || echo 
'./'`subclassingdlg.cpp
subclassingdlg.cpp: In method `SlotItem::SlotItem(QListView *, const QString 
&, const QString &, const QString &, const QString &, bool)':
subclassingdlg.cpp:36: ambiguous overload for `bool ? const char[7] : const 
QString &'
subclassingdlg.cpp:36: candidates are: operator ?:(bool, QString, QString) 
<builtin>
subclassingdlg.cpp:36:                 operator ?:(bool, 
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> 
>, string) <builtin>
subclassingdlg.cpp:36:                 operator ?:(bool, const char *, const 
char *) <builtin>
subclassingdlg.cpp:37: ambiguous overload for `bool ? const char[8] : const 
QString &'
subclassingdlg.cpp:37: candidates are: operator ?:(bool, QString, QString) 
<builtin>
subclassingdlg.cpp:37:                 operator ?:(bool, 
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> 
>, string) <builtin>
subclassingdlg.cpp:37:                 operator ?:(bool, const char *, const 
char *) <builtin>
subclassingdlg.cpp:38: ambiguous overload for `bool ? const char[5] : const 
QString &'
subclassingdlg.cpp:38: candidates are: operator ?:(bool, QString, QString) 
<builtin>
subclassingdlg.cpp:38:                 operator ?:(bool, 
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> 
>, string) <builtin>
subclassingdlg.cpp:38:                 operator ?:(bool, const char *, const 
char *) <builtin>
make[4]: *** [subclassingdlg.lo] Error 1
make[4]: Leaving directory `/home/magius/projects/kdevelop/parts/trollproject'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/magius/projects/kdevelop/parts/trollproject'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/magius/projects/kdevelop/parts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/magius/projects/kdevelop'
make: *** [all] Error 2


To fix I editied the following from:

parts/trollproject/subclassingdlg.cpp:

m_access = access == "" ? "public" : access;
m_specifier = specifier == "" ? "virtual" : specifier;
m_returnType = returnType == "" ? "void" : returnType;

to:

m_access = access == "" ? (const QString) "public" : access;
m_specifier = specifier == "" ? (const QString) "virtual" : specifier;
m_returnType = returnType == "" ? (const QString) "void" : returnType;

Should this be included in the CVS source?  It continued to compile fine 
afterwords:


-- 
Regards,
Adam J. Watson
http://www.warpdgfx.com




More information about the KDevelop-devel mailing list