summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-06 10:05:35 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-06 10:05:35 +0100
commit4ac3ee42910739695bcdf065651555d2d6a700f7 (patch)
treea5d16edfb8cd0715171a2995403ee5a7fa3565e6 /src
parent86fb0dc9bde6aafb190a50d49f3f41b1fc774244 (diff)
Do not return value from copySelection().
Diffstat (limited to 'src')
-rw-r--r--src/copyeventfilter.cpp8
-rw-r--r--src/copyeventfilter.h2
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;