Bug 143802 - Filter and fit names not consistently reported in the UI
Summary: Filter and fit names not consistently reported in the UI
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-03 19:59 UTC by Andrew Walker
Modified: 2007-05-08 22:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
 }