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
With this in mind I made some tentative edits to MainWindow.cpp, diff is
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?
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
/usr/include/qt3/qxml.h:154: error: candidates are:
MainWindow.cpp:402: error: `source' undeclared (first use this function)
MainWindow.cpp:402: error: (Each undeclared identifier is reported only
for each function it appears in.)
make: *** [MainWindow.o] Error 1
The main problem was that you were declaring the QXmlInputSource inside the "if" and "else if" blocks, meaning the variable
was local to the if and else if blocks, i.e. it can not be used outside the "if" and "else if". Also the QXmlInputSource constructor
takes a pointer to a QIODevice, so you need an & symbol. The above code incorporates both those changes.