View Full Version : qsharedpointer_impl.h:279:67: error: ‘internalConstruct’

21st October 2014, 06:57
Qt Version: 4.5.1
OS: centos 7 x86_64

My code is like this.
QSharedPointer<LineModel> model = QSharedPointer<LineModel>(new LineModel(strName, str));

when I make it, it outputs the error as following.
/opt/qtsdk-2009.02/qt/include/QtCore/qsharedpointer_impl.h:279:67: error: ‘internalConstruct’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
inline explicit QSharedPointer(T *ptr) { internalConstruct(ptr); }
/opt/qtsdk-2009.02/qt/include/QtCore/qsharedpointer_impl.h:279:67: note: declarations in dependent base ‘QtSharedPointer::ExternalRefCount<LineModel>’ are not found by unqualified lookup
/opt/qtsdk-2009.02/qt/include/QtCore/qsharedpointer_impl.h:279:67: note: use ‘this->internalConstruct’ instead

Any help will be appreciated.