Hi, class A { public: .... private: QSharedPointer<QValidator> m_Validator; }
My custom program: if(di.Validator()->isNull()) { // unfortunately the di.Validator() is null // some A-s in the Map can have nullptr as Validator. if(auto validator = di.Validator()) // di is an instance of A { if(validator != nullptr) { // old code that doesn't compile anymore with Qt 5.12.3 //QDomElement dom = HelperS::Instance()->ValidatorToDomElement(validator.data()); // new code that compiles with Qt 5.12.3 QDomElement dom = HelperS::Instance()->ValidatorToDomElement(di.Validator()); parameter.appendChild(dom); // TNagy: .data removed } } } The problem is that in spite of the QSharedPointer, the members of the QSharedPointer: .data() and .isNull() are not accessible at all. I also tried parentheses but no success. Sometimes the Validators can be null sometimes not. I have to check if it is null or not. What is the problem with the QSharedPointer, why is it not visible in that case? If I try to use the intellisense on the di.Validator. it lists only the members of the QValidator. Tamas _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest