From b26fa9722f9e8c81406259f6db8044e8bbc2d50b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 29 Sep 2020 13:09:19 +0200 Subject: Add multi key bindings to QShortcut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it feature comparable with QAction, and makes it possible to use as a backend for QAction, and fixes a few missing alternative keybindings in qtwidgets. Change-Id: Iaefc630b96c4743fc5ef429dc841870ddd99fc64 Reviewed-by: Tor Arne Vestbø Reviewed-by: Volker Hilsheimer Reviewed-by: Lars Knoll --- src/widgets/dialogs/qfiledialog.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/widgets/dialogs/qfiledialog.cpp') diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index adbf655750..ff884d925e 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3048,8 +3048,7 @@ void QFileDialogPrivate::createWidgets() QObject::connect(qFileDialogUi->listView, SIGNAL(customContextMenuRequested(QPoint)), q, SLOT(_q_showContextMenu(QPoint))); #ifndef QT_NO_SHORTCUT - QShortcut *shortcut = new QShortcut(qFileDialogUi->listView); - shortcut->setKey(QKeySequence(QLatin1String("Delete"))); + QShortcut *shortcut = new QShortcut(QKeySequence::Delete, qFileDialogUi->listView); QObject::connect(shortcut, SIGNAL(activated()), q, SLOT(_q_deleteCurrent())); #endif @@ -3088,8 +3087,7 @@ void QFileDialogPrivate::createWidgets() QObject::connect(qFileDialogUi->treeView, SIGNAL(customContextMenuRequested(QPoint)), q, SLOT(_q_showContextMenu(QPoint))); #ifndef QT_NO_SHORTCUT - shortcut = new QShortcut(qFileDialogUi->treeView); - shortcut->setKey(QKeySequence(QLatin1String("Delete"))); + shortcut = new QShortcut(QKeySequence::Delete, qFileDialogUi->treeView); QObject::connect(shortcut, SIGNAL(activated()), q, SLOT(_q_deleteCurrent())); #endif -- cgit v1.2.3