X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnoteswidget.cpp;h=e18e2142598a0510415d4633e47e513b000d6562;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=cf5eac2391651617235d44ae7401177ae31195a4;hpb=21812fe2e0db89f1044d179eb788bbc1022b5577;p=kdenlive diff --git a/src/noteswidget.cpp b/src/noteswidget.cpp index cf5eac23..e18e2142 100644 --- a/src/noteswidget.cpp +++ b/src/noteswidget.cpp @@ -29,22 +29,25 @@ NotesWidget::NotesWidget(QWidget * parent) : KTextEdit(parent) { - connect(this, SIGNAL(aboutToShowContextMenu(QMenu *)), this, SLOT(slotFillNotesMenu(QMenu *))); + connect(this, SIGNAL(aboutToShowContextMenu(QMenu*)), this, SLOT(slotFillNotesMenu(QMenu*))); setMouseTracking(true); } void NotesWidget::slotFillNotesMenu(QMenu *menu) { - QAction *a = new QAction(i18n("Insert current timecode"), this); + QAction *a = new QAction(i18n("Insert current timecode"), menu); connect(a, SIGNAL(triggered(bool)), this, SIGNAL(insertNotesTimecode())); menu->insertAction(menu->actions().at(0), a); } void NotesWidget::mouseMoveEvent( QMouseEvent * e ) { - QString anchor = anchorAt(e->pos()); - if (anchor.isEmpty()) viewport()->setCursor(Qt::IBeamCursor); - else viewport()->setCursor(Qt::PointingHandCursor); + const QString anchor = anchorAt(e->pos()); + if (anchor.isEmpty()) + viewport()->setCursor(Qt::IBeamCursor); + else + viewport()->setCursor(Qt::PointingHandCursor); + KTextEdit::mouseMoveEvent(e); } void NotesWidget::mousePressEvent( QMouseEvent * e ) @@ -65,3 +68,5 @@ NotesWidget::~NotesWidget() + +#include "noteswidget.moc"