mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
[AdditionalInfoDialog] Prevent hiding "text" role
You cannot do this from the menu but the option was there (but ignored) in the "View Properties" dialog. BUG: 302622 Differential Revision: https://phabricator.kde.org/D7386
This commit is contained in:
parent
3bfdf0d2f0
commit
dfbaf21218
|
@ -69,9 +69,9 @@ AdditionalInfoDialog::AdditionalInfoDialog(QWidget* parent,
|
||||||
QListWidgetItem* item = new QListWidgetItem(info.translation, m_listWidget);
|
QListWidgetItem* item = new QListWidgetItem(info.translation, m_listWidget);
|
||||||
item->setCheckState(visibleRoles.contains(info.role) ? Qt::Checked : Qt::Unchecked);
|
item->setCheckState(visibleRoles.contains(info.role) ? Qt::Checked : Qt::Unchecked);
|
||||||
|
|
||||||
const bool enable = (!info.requiresBaloo && !info.requiresIndexer) ||
|
const bool enable = ((!info.requiresBaloo && !info.requiresIndexer) ||
|
||||||
(info.requiresBaloo) ||
|
(info.requiresBaloo) ||
|
||||||
(info.requiresIndexer && indexingEnabled);
|
(info.requiresIndexer && indexingEnabled)) && info.role != "text";
|
||||||
|
|
||||||
if (!enable) {
|
if (!enable) {
|
||||||
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
|
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
|
||||||
|
|
Loading…
Reference in a new issue