Bug 143802

Summary: Filter and fit names not consistently reported in the UI
Product: [Applications] kst Reporter: Andrew Walker <arwalker>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrew Walker 2007-04-03 19:59:48 UTC
Version:           HEAD (using KDE KDE 3.5.1)
OS:                Linux

PROBLEM:

The names for filter and fit plugins are reported inconsistently in the UI.

STEPS TO REPRODUCE:

Start Kst
Create a curve
Open the Data Manager
Click on "Create Fit"
Select "Fit gradient"
Hit OK in the New Plugin dialog

RESULTS:

A new entry in the data manager is created, called "kstfit_gradient_unweighted"

EXPECTED RESULTS:

A new entry in the data manager is created, called "Fit gradient"

NOTE:

The same problem occurs for all filter and fit plugins.
Comment 1 Andrew Walker 2007-04-25 20:50:56 UTC
The problem is caused by the two different types of plugin returning different names when propertyString() is called.

KstBasicPlugin returns the non-readable name ("name" in the xml file) while KstCPlugin returns the readable name ("Name" in the desktop file).
Comment 2 Andrew Walker 2007-05-08 22:36:25 UTC
SVN commit 662655 by arwalker:

BUG:143802 Display the readable name in the data manager for fits and filters

 M  +10 -2     kstcplugin.cpp  


--- branches/work/kst/1.5/kst/src/libkstmath/kstcplugin.cpp #662654:662655
@@ -528,10 +528,18 @@
 
 
 QString KstCPlugin::propertyString() const {
+  QString str;
+
   if (!isValid()) {
-    return i18n("Invalid plugin.");
+    str = i18n("Invalid plugin.");
+  } else {
+    str = plugin()->data()._readableName;
+    if (str.isEmpty()) {
+      str = plugin()->data()._name;
+    }
   }
-  return plugin()->data()._name;
+
+  return str;
 }