summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-25 15:24:01 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-25 15:24:01 (GMT)
commit143fbe251f626bc74e4f90fee55deddecb50d627 (patch)
tree3e22a991954dc7c291c5c58adb7b76648b439a8c /src/gui/widgets/qlinecontrol.cpp
parente58b0e2e562f1c5284ced8671d85df748a4a9639 (diff)
parent7b845236d8670bb9cb5884ea60f422d09dafd89c (diff)
downloadQt-143fbe251f626bc74e4f90fee55deddecb50d627.zip
Qt-143fbe251f626bc74e4f90fee55deddecb50d627.tar.gz
Qt-143fbe251f626bc74e4f90fee55deddecb50d627.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 9d533ae..87975c3 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -138,7 +138,12 @@ void QLineControl::copy(QClipboard::Mode mode) const
*/
void QLineControl::paste()
{
- insert(QApplication::clipboard()->text(QClipboard::Clipboard));
+ QString clip = QApplication::clipboard()->text(QClipboard::Clipboard);
+ if (!clip.isEmpty() || hasSelectedText()) {
+ separate(); //make it a separate undo/redo command
+ insert(clip);
+ separate();
+ }
}
#endif // !QT_NO_CLIPBOARD