Reputation: 318
I´m getting the following error on this piece of code.
QScopedPointer<NoteEvent> onEvent(new NoteEvent(date, chan, pitch, vel, true));
QScopedPointer<NoteEvent> offEvent(new NoteEvent(date + dur, chan, pitch, vel, false));
Score::noteStream->addNoteEvent(onEvent);
Score::noteStream->addNoteEvent(offEvent);
void NoteStream::addNoteEvent(QScopedPointer<NoteEvent> noteEvent)
{
noteEvents->push_back(noteEvent);
}
Error: C2248: "QScopedPointer": No access to private member declared in QScopedPointer
Reading through other posts was not helpful.
Upvotes: 2
Views: 1066
Reputation: 52471
QScopedPointer
doesn't have a public copy constructor. It cannot be passed around by value, nor stored in containers that require its elements to be copyable (which noteEvents
might be, depending on how it's declared).
Upvotes: 4