Home > Back-end >  QT Creator run under CPP files appear parameters can not be 1 from "nullptr" into "co
QT Creator run under CPP files appear parameters can not be 1 from "nullptr" into "co

Time:09-20

QT Creator, run the CPP file appear parameters can not be 1 from "nullptr" into "const QSharedPointer,,
The code below
QSharedPointer MessageFactory: : create (const QString & amp; Sender, const QByteArray & amp; Data,
Const int type) {
The switch (type) {
In case the Message: : TextMessage:
//As with STD: : from a QSharedPointer to a base class can hold a derived class pointer.
Return QSharedPointer (new TextMessage (sender, QString: : fromUtf8 (data)));
//TODO: handle other message types
}
Return nullptr.
}
Finally, in return, errors in nullptr parameters can not be 1 from "nullptr" into "const QSharedPointer,,
  • Related