diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-02-15 10:28:28 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-21 17:19:40 (GMT) |
commit | e3cc56d532edc97291b4f5a6c95db8b0ed8b3fe8 (patch) | |
tree | f10406d80f6ea2c4cd6d1ab96b6d01f0ebc7eba4 /src/gui | |
parent | 5ac70b848e2cd1c4e5462cd8fe3467c57a749adf (diff) | |
download | Qt-e3cc56d532edc97291b4f5a6c95db8b0ed8b3fe8.zip Qt-e3cc56d532edc97291b4f5a6c95db8b0ed8b3fe8.tar.gz Qt-e3cc56d532edc97291b4f5a6c95db8b0ed8b3fe8.tar.bz2 |
Fix multiselection by CTRL-click in QFileDialog/KDE.
Task-number: QTBUG-29257
Change-Id: Idfac80e855455a4537dd38a23136762cd9398e15
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
(cherry picked from qtbase/b6ccdfa4823d4608f5cb94797b48fc82b8833581)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index aeb84f4..92ffedc 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -3001,7 +3001,11 @@ void QFileDialogPrivate::_q_enterDirectory(const QModelIndex &index) lineEdit()->clear(); } } else { - q->accept(); + // Do not accept when shift-clicking to multi-select a file in environments with single-click-activation (KDE) + if (!q->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) + || q->fileMode() != QFileDialog::ExistingFiles || !(QApplication::keyboardModifiers() & Qt::CTRL)) { + q->accept(); + } } } |