[Openstreetmap-dev] Hacking osm-editor (warning c++ newbie)
Alex Willmer
alex at moreati.org.uk
Thu Sep 22 22:00:54 BST 2005
Evening all,
I've been trying out the latest osm-editor, seems to be just the ticket.
There was one aspect that bugged me. To save a _lot_ of space my gpx
files are all gzipped (eg track-20050101,gpx.gz). It would be nice if
osm-editor could read them directly, rather than needing to gunzip them
myself.
With this in mind I made some tentative edits to MainWindow.cpp, diff is
attached.
Frankly, this is my first ever c++ code beyond "Hello World!" and I'm
sure it shows. Most of it is an educated guess, some is shooting blind.
My compilation is bombing out at line 402, when I try to pass a QBuffer
to the constructor of QXmlInputSource. I've tried decorating the qbuf
argument with &/* but those are obviously also wrong.
I'd just like to know, am I on the right track, even to produce a memory
leaking, but functioning hack. Or is this a complete WTF?
Thanks
Alex
Here is the compilation error I'm receiving:
c++ -w -g -I/usr/include/qt3 `curl-config --cflags` -I/usr/local/include
-Ijeeps-0.1.4-nick -c -o MainWindow.o MainWindow.cpp
MainWindow.cpp: In member function `OpenStreetMap::Components*
OpenStreetMap::MainWindow::doOpen(const QString&, bool)':
MainWindow.cpp:398: error: no matching function for call to
`QXmlInputSource::
QXmlInputSource(QBuffer&)'
/usr/include/qt3/qxml.h:154: error: candidates are:
QXmlInputSource::QXmlInputSource(const QXmlInputSource&)
/usr/include/qt3/qxml.h:159: error:
QXmlInputSource::QXmlInputSource(QTextStream&)
/usr/include/qt3/qxml.h:158: error:
QXmlInputSource::QXmlInputSource(QFile&)
/usr/include/qt3/qxml.h:157: error:
QXmlInputSource::QXmlInputSource(QIODevice*)
/usr/include/qt3/qxml.h:156: error:
QXmlInputSource::QXmlInputSource()
MainWindow.cpp:402: error: `source' undeclared (first use this function)
MainWindow.cpp:402: error: (Each undeclared identifier is reported only
once
for each function it appears in.)
make: *** [MainWindow.o] Error 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MainWindow.cpp.diff
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20050922/a37628ed/attachment.bin>
More information about the dev
mailing list