summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAndreas Hartmetz <andreas.hartmetz@kdab.com>2016-01-17 01:05:07 +0100
committerAndreas Hartmetz <ahartmetz@gmail.com>2017-08-17 18:05:53 +0000
commit90749ecf0903ba80996e04cc735e7695c2641e58 (patch)
tree24957e13d21a05b183850933f2302b319d26b604 /src/widgets
parent2e1ad4335cb236e0b21f5b395cc8bc54cabedea9 (diff)
QLineEdit: Create a separate undo entry for each middle-click paste
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ø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qlineedit.cpp2
1 files changed, 1 insertions, 1 deletions
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