diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-27 09:00:05 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-27 09:00:05 (GMT) |
commit | 137828d220a219fe0061afc56f2522e9e3d1ee79 (patch) | |
tree | 88ecd1e8c101c2ba19aea00075e3a123baf6a894 /src/gui/widgets/qlinecontrol.cpp | |
parent | bc2b222148648354fe15a6f8da9e01743a1e3e3f (diff) | |
parent | 19d0a365dd99dc1a108e58949f7d0f49bac72623 (diff) | |
download | Qt-137828d220a219fe0061afc56f2522e9e3d1ee79.zip Qt-137828d220a219fe0061afc56f2522e9e3d1ee79.tar.gz Qt-137828d220a219fe0061afc56f2522e9e3d1ee79.tar.bz2 |
Merge branch '4.6' of 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.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 06ef1db..117c550 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 |