[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-workspace] components/shellprivate/widgetexplorer: Fix containments category showing up in t
From:       Bhushan Shah <bhush94 () gmail ! com>
Date:       2015-04-05 4:38:59
Message-ID: E1YecKp-0003NY-AH () scm ! kde ! org
[Download RAW message or body]

Git commit 005ea5f7af6bbeda173b0a60c5511f30ca3f294f by Bhushan Shah.
Committed on 05/04/2015 at 04:37.
Pushed by bshah into branch 'master'.

Fix containments category showing up in the widgetexplorer

It is not meant to be shown in widget explorer. It is not being shown
when english language is used because

i18n("Containments") == "Containments"

but in other languages for example x-test

i18n("Containments") == "xxContainmentsxx" and hence this condition
doesn't pass and it shows up in UI

M  +1    -1    components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
M  +1    -1    components/shellprivate/widgetexplorer/widgetexplorer.cpp

http://commits.kde.org/plasma-workspace/005ea5f7af6bbeda173b0a60c5511f30ca3f294f

diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp \
b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp index \
                97315d3..376dd4c 100644
--- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
+++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
@@ -250,7 +250,7 @@ void PlasmaAppletItemModel::populateModel(const QStringList \
&whatChanged)  
     for (auto info : list) {
         //qDebug() << info.pluginName() << "NoDisplay" << \
                info.property("NoDisplay").toBool();
-        if (!info.isValid() || info.property("NoDisplay").toBool() || \
info.category() == i18n("Containments")) { +        if (!info.isValid() || \
info.property("NoDisplay").toBool() || info.category() == "Containments") {  // we \
don't want to show the hidden category  continue;
         }
diff --git a/components/shellprivate/widgetexplorer/widgetexplorer.cpp \
b/components/shellprivate/widgetexplorer/widgetexplorer.cpp index cb5e8fe..49b7da9 \
                100644
--- a/components/shellprivate/widgetexplorer/widgetexplorer.cpp
+++ b/components/shellprivate/widgetexplorer/widgetexplorer.cpp
@@ -122,7 +122,7 @@ void WidgetExplorerPrivate::initFilters()
 
     for (auto data : list) {
         const KPluginInfo info(data);
-        if (info.property("NoDisplay").toBool() || info.category() == \
i18n("Containments") || +        if (info.property("NoDisplay").toBool() || \
info.category() == "Containments" ||  info.category().isEmpty()) {
             // we don't want to show the hidden category
             continue;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic