Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.2
-
None
-
Windows
Description
The following code reproduces the problem (this behaviour definitely was not present in Qt 4.4.x):-
#include <QtCore/QCoreApplication> #include <QDomElement> class DataType { public: virtual ~DataType() {} QDomElement Serialize() const { QDomDocument xmld; QDomElement xmle = xmld.createElement("DataType"); // ret val // add some attributes... xmle.setAttribute("Name","I'm Qt!"); return xmle; } }; class IntegerDataType : public DataType { public: QDomElement Serialize() const { QDomElement xmle = DataType::Serialize(); xmle.setAttribute("Value","10"); return xmle; } }; int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); IntegerDataType obj; { QDomElement xmle = obj.Serialize(); // Then append the domelement to a domdocument which will be saved to the disk etc etc... } return 0; }