diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/copyeventfilter.cpp | 8 | ||||
| -rw-r--r-- | src/copyeventfilter.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/copyeventfilter.cpp b/src/copyeventfilter.cpp index bbde13e6..223561b0 100644 --- a/src/copyeventfilter.cpp +++ b/src/copyeventfilter.cpp @@ -17,10 +17,10 @@ CopyEventFilter::CopyEventFilter( } -bool CopyEventFilter::copySelection() const +void CopyEventFilter::copySelection() const { if (!m_view->selectionModel()->hasSelection()) { - return true; + return; } // sort to reflect the visual order @@ -35,7 +35,6 @@ bool CopyEventFilter::copySelection() const } QGuiApplication::clipboard()->setText(rows.join("\n")); - return true; } bool CopyEventFilter::eventFilter(QObject* sender, QEvent* event) @@ -44,7 +43,8 @@ bool CopyEventFilter::eventFilter(QObject* sender, QEvent* event) QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); if (keyEvent->modifiers() == Qt::ControlModifier && keyEvent->key() == Qt::Key_C) { - return copySelection(); + copySelection(); + return true; } } return QObject::eventFilter(sender, event); diff --git a/src/copyeventfilter.h b/src/copyeventfilter.h index 1243630b..a9d0a1c1 100644 --- a/src/copyeventfilter.h +++ b/src/copyeventfilter.h @@ -29,7 +29,7 @@ public: // copy the selection of the view associated with this // event filter into the clipboard // - bool copySelection() const; + void copySelection() const; bool eventFilter(QObject* sender, QEvent* event) override; |
