summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-11-27 09:00:05 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-11-27 09:00:05 (GMT)
commit137828d220a219fe0061afc56f2522e9e3d1ee79 (patch)
tree88ecd1e8c101c2ba19aea00075e3a123baf6a894 /src/gui/widgets/qlinecontrol.cpp
parentbc2b222148648354fe15a6f8da9e01743a1e3e3f (diff)
parent19d0a365dd99dc1a108e58949f7d0f49bac72623 (diff)
downloadQt-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.cpp7
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