]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[AdditionalInfoDialog] Prevent hiding "text" role
authorKai Uwe Broulik <kde@privat.broulik.de>
Fri, 25 Aug 2017 14:48:48 +0000 (16:48 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Fri, 25 Aug 2017 14:48:48 +0000 (16:48 +0200)
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

src/settings/additionalinfodialog.cpp

index 23a65b5ac0a96e7f5a1d6812848ef898aa5650a1..4589b5d4477a947622236fa10316a97bd39002ed 100644 (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);
 
         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.requiresBaloo) ||
-                            (info.requiresIndexer && indexingEnabled);
+                            (info.requiresIndexer && indexingEnabled)) && info.role != "text";
 
         if (!enable) {
             item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
 
         if (!enable) {
             item->setFlags(item->flags() & ~Qt::ItemIsEnabled);