From 90749ecf0903ba80996e04cc735e7695c2641e58 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sun, 17 Jan 2016 01:05:07 +0100 Subject: [PATCH] QLineEdit: Create a separate undo entry for each middle-click paste MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, a sequence of middle-click pastes produced just one undo item to undo/redo all of the pastes at once. The new code seems to be the intended way to paste the selection anyway. Change-Id: Ifc2e9714628da9e394053ff8c34709578656f54d Reviewed-by: Tor Arne Vestbø --- src/widgets/widgets/qlineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index a4444a2b2c..7f47fdde87 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1582,7 +1582,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) d->control->copy(QClipboard::Selection); } else if (!d->control->isReadOnly() && e->button() == Qt::MidButton) { deselect(); - insert(QApplication::clipboard()->text(QClipboard::Selection)); + d->control->paste(QClipboard::Selection); } } #endif