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>
This commit is contained in:
Friedemann Kleint 2013-02-15 11:28:28 +01:00 committed by The Qt Project
parent e28c03cb82
commit b6ccdfa482

View File

@ -2966,7 +2966,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 || !(QGuiApplication::keyboardModifiers() & Qt::CTRL)) {
q->accept();
}
}
}