slotEditGuide: use QPointer [krazy 13/37] by Mikko Rapeli

parent d9599175
......@@ -5297,11 +5297,12 @@ void CustomTrackView::slotEditGuide(int guidePos)
void CustomTrackView::slotEditGuide(CommentedTime guide)
{
MarkerDialog d(NULL, guide, m_document->timecode(), i18n("Edit Guide"), this);
if (d.exec() == QDialog::Accepted) {
EditGuideCommand *command = new EditGuideCommand(this, guide.time(), guide.comment(), d.newMarker().time(), d.newMarker().comment(), true);
QPointer<MarkerDialog> d = new MarkerDialog(NULL, guide, m_document->timecode(), i18n("Edit Guide"), this);
if (d->exec() == QDialog::Accepted) {
EditGuideCommand *command = new EditGuideCommand(this, guide.time(), guide.comment(), d->newMarker().time(), d->newMarker().comment(), true);
m_commandStack->push(command);
}
delete d;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment