diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 05:44:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-17 05:44:14 (GMT) |
commit | 67d8b96d11b560367f068c2466664898a6fb5aed (patch) | |
tree | b60a7fd15f68d49c530bfa3ca326bdcfe070a9c3 /src/gui/widgets/qlinecontrol.cpp | |
parent | 53fd1e2fd9c75d7d55606d4ac5df75eda96b9cc9 (diff) | |
parent | da8eb86480e188112193b66a265a7e957efc9de1 (diff) | |
download | Qt-67d8b96d11b560367f068c2466664898a6fb5aed.zip Qt-67d8b96d11b560367f068c2466664898a6fb5aed.tar.gz Qt-67d8b96d11b560367f068c2466664898a6fb5aed.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (83 commits)
probably need to update user configurations once in a while too
use dynamicstore instead
Define JS_NO_EXPORT to avoid JSC C API functions being exported
Don't use QScriptValueIterator to iterate over an array
QtScript: Fix regression when calling newQObject() from native constructor
Added note to OS X installation instructions.
Keypress events ignored in listview on Cocoa (64 Bit) with Japanese IME
Update only appropriate rectangles during update_sys().
Marked QTDS obsolete from Qt 4.7.
QNetworkReply: Fix canReadLine()
Abort waiting replies on session error.
different approach to fixing "the other" aliasing issue
fix aliasing issue in node_construct()
detach in fewer cases, remove redundant calculation
SSL: Fix memleak related to local certificate
Improve keyboard layout detection on X11
Compile on ARM with -Werror -Wold-style-cast
Use the vista-style native dialog for QFileDialog::getExistingDirectory
Apply the stdset attribute for resource properties
doc: Completed sentence about HideNameFilterDetails
...
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 9ec0feb..8e715a9 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -136,9 +136,9 @@ void QLineControl::copy(QClipboard::Mode mode) const \sa insert() */ -void QLineControl::paste() +void QLineControl::paste(QClipboard::Mode clipboardMode) { - QString clip = QApplication::clipboard()->text(QClipboard::Clipboard); + QString clip = QApplication::clipboard()->text(clipboardMode); if (!clip.isEmpty() || hasSelectedText()) { separate(); //make it a separate undo/redo command insert(clip); @@ -1576,8 +1576,14 @@ void QLineControl::processKeyEvent(QKeyEvent* event) copy(); } else if (event == QKeySequence::Paste) { - if (!isReadOnly()) - paste(); + if (!isReadOnly()) { + QClipboard::Mode mode = QClipboard::Clipboard; +#ifdef Q_WS_X11 + if (event->modifiers() == (Qt::CTRL | Qt::SHIFT) && event->key() == Qt::Key_Insert) + mode = QClipboard::Selection; +#endif + paste(mode); + } } else if (event == QKeySequence::Cut) { if (!isReadOnly()) { |