Bug 312414

Summary: Connection list filter doesn't work with localized strings
Product: Network Management Reporter: Kai Uwe Broulik <kde>
Component: Plasma WidgetAssignee: Sebastian K├╝gler <sebas>
Status: RESOLVED FIXED    
Severity: normal CC: jgrulich, lamarque, wstephenson
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.0.7

Description Kai Uwe Broulik 2012-12-31 02:46:07 UTC
With the new QML plasmoid that got just merged, my connection list stays empty.

The cause is:
applet/qml/ConnectionsTabWidget.qml uses eg. i18n("Connections") for TabButton text and then fires connectionsListModel.setFilter(currentTab.text) when the selected tab changes.
The ConnectionsListModel::setFilter in applet/connectionlistmodel.cpp does a string compare such as tabName == "Connections" which doesn't work when the TabButton Text is translated to eg. "Verbindungen".

Reproducible: Always
Comment 1 Jan Grulich 2013-01-01 20:16:41 UTC
I pushed the commit with the fix. 

http://commits.kde.org/networkmanagement/e4b705b75c35397fd350bdb4cbbfff40028a3f95
Comment 2 Kai Uwe Broulik 2013-01-02 17:45:59 UTC
One problem remains though: when Plasma is first started/restarted, the list is empty, I have to switch to another tab and back to Connections to get my list
Comment 3 Jan Grulich 2013-01-02 17:57:57 UTC
This problem is caused because the filter is applied when the currentTabChanged signal is catched. This does not happen when you first start the applet. I told lamarque about this problem. I could look at it tomorow and try to fix it.
Comment 4 Lamarque V. Souza 2013-01-02 21:07:19 UTC
(In reply to comment #3)
> This problem is caused because the filter is applied when the
> currentTabChanged signal is catched. This does not happen when you first
> start the applet. I told lamarque about this problem. I could look at it
> tomorow and try to fix it.

That's already fixed in commit 87c8bb47238e95ca2b05a20df042f18f5448985b