tags 565095 +patch thanks Hi,
just saw what's going wrong here: device is a member function in QXmlStreamWriter, hence the namespace must be supplied to select the class name instead. I'm not quite sure why device::device worked in the first place, but ::device is to my knowledge correct (and works with Ubuntu's gcc-4.5, too :)). Attached is a patch that fixes the build failure with Ubuntu's gcc-4.5, I'm quite confident that it'll also work with gcc-4.5 from experimental, but haven't tested that. Cheers, Stefan.
Index: netemul-1.0.0/src/tools/scenexmlwriter.cpp
===================================================================
--- netemul-1.0.0.orig/src/tools/scenexmlwriter.cpp 2009-11-11 07:20:26.000000000 +0100
+++ netemul-1.0.0/src/tools/scenexmlwriter.cpp 2010-12-11 21:10:40.323678999 +0100
@@ -13,7 +13,7 @@
writeStartDocument();
writeStartElement("netemul");
writeAttribute("version",QCoreApplication::applicationVersion() );
- foreach ( device::device *i , myScene->devices() )
+ foreach ( ::device *i , myScene->devices() )
i->writeXml(*this);
foreach ( textItem *i , myScene->textItems() ) {
writeStartElement("textitem");
Index: netemul-1.0.0/src/tools/scenexmlreader.cpp
===================================================================
--- netemul-1.0.0.orig/src/tools/scenexmlreader.cpp 2010-12-11 21:22:19.453678999 +0100
+++ netemul-1.0.0/src/tools/scenexmlreader.cpp 2010-12-11 21:22:27.323678999 +0100
@@ -48,7 +48,7 @@
readNext();
if ( isEndElement() ) break;
if ( name() == "device" ) {
- device::device *item = new ::device(*this);
+ ::device *item = new ::device(*this);
item->setMenu(myScene->itemMenu() );
myScene->registerDevice(item);
}
signature.asc
Description: This is a digitally signed message part.

