Don't use string comparison to figure out how to use the clipboard
Change-Id: I36738b3808ebed0d108882ebdc74ee7dd1899bfd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
0eb3d74386
commit
49112c891b
@ -1271,9 +1271,10 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
else if (e == QKeySequence::Paste) {
|
||||
QClipboard::Mode mode = QClipboard::Clipboard;
|
||||
if (QGuiApplication::platformName() == QLatin1String("xcb"))
|
||||
if (e->modifiers() == (Qt::CTRL | Qt::SHIFT) && e->key() == Qt::Key_Insert)
|
||||
mode = QClipboard::Selection;
|
||||
if (QGuiApplication::clipboard()->supportsSelection()) {
|
||||
if (e->modifiers() == (Qt::CTRL | Qt::SHIFT) && e->key() == Qt::Key_Insert)
|
||||
mode = QClipboard::Selection;
|
||||
}
|
||||
q->paste(mode);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user