X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnoteswidget.cpp;h=f3e5aaac64b0f657932fb38b32564a9fd10c9040;hb=29ceabd2afc227e0fb8b586c567eeaf7921b542e;hp=cf5eac2391651617235d44ae7401177ae31195a4;hpb=21812fe2e0db89f1044d179eb788bbc1022b5577;p=kdenlive diff --git a/src/noteswidget.cpp b/src/noteswidget.cpp index cf5eac23..f3e5aaac 100644 --- a/src/noteswidget.cpp +++ b/src/noteswidget.cpp @@ -20,7 +20,7 @@ #include "noteswidget.h" -#include +#include #include #include #include @@ -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"