[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:
Kai Uwe Broulik 2017-08-25 16:48:48 +02:00
parent 3bfdf0d2f0
commit dfbaf21218

View file

@ -69,9 +69,9 @@ AdditionalInfoDialog::AdditionalInfoDialog(QWidget* parent,
QListWidgetItem* item = new QListWidgetItem(info.translation, m_listWidget);
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.requiresIndexer && indexingEnabled);
(info.requiresIndexer && indexingEnabled)) && info.role != "text";
if (!enable) {
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);