Compile error in CVS doctreeview/doctreeviewwidget.cpp
Chris Halls
halls at debian.org
Thu Oct 16 13:48:05 UTC 2003
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../lib/interfaces -I../../lib/util -I../../lib/widgets -I/usr/include/kde -I/usr/include/qt3 -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c -o librarydocdlg.lo `test -f 'librarydocdlg.cpp' || echo './'`librarydocdlg.cpp
doctreeviewwidget.cpp: In member function `virtual void
DocTreeDocbaseFolder::setOpen(bool)':
doctreeviewwidget.cpp:767: error: cannot convert `QString' to `const char*' for
argument `1' to `FILE* fopen(const char*, const char*)'
make[5]: *** [doctreeviewwidget.lo] Error 1
make[5]: Leaving directory `/home/challs/dev/kde/kdevelop/parts/doctreeview'
I'm using debian unstable, gcc 3.2.2. and I guess that something somewhere
has defined QT_NO_ASCII_CAST for me.
I worked around it with an explicit conversion:
Index: doctreeview/doctreeviewwidget.cpp
===================================================================
RCS file: /home/kde/kdevelop/parts/doctreeview/doctreeviewwidget.cpp,v
retrieving revision 1.70
diff -u -r1.70 doctreeviewwidget.cpp
--- doctreeview/doctreeviewwidget.cpp 22 Sep 2003 10:03:33 -0000 1.70
+++ doctreeview/doctreeviewwidget.cpp 16 Oct 2003 11:41:41 -0000
@@ -764,7 +764,7 @@
for (it = fileList.begin(); it != fileList.end(); ++it)
{
FILE *f;
- if ( (f = fopen(d.filePath(*it), "r")) != 0)
+ if ( (f = fopen(d.filePath(*it).latin1(), "r")) != 0)
{
readDocbaseFile(f);
fclose(f);
Is that the right thing to do?
Thanks,
Chris
More information about the KDevelop-devel
mailing list