Bug 267809 - plasmoid.readConfig does not return lists in javascript plasmoids
Summary: plasmoid.readConfig does not return lists in javascript plasmoids
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Plasma
Component: scriptengines (show other bugs)
Version: 4.6.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 18:18 UTC by Fabian Badoi
Modified: 2018-09-04 19:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Badoi 2011-03-06 18:18:41 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

Calling plasmoid.readConfig for items which are StringList returns "QVariant(QStringList)" instead of the actual content.

For example:
<entry name="Name" type="StringList">
<default>a,b,c,d,e,f,g</default>

Will not output an array.

I encountered this while trying to fix this plasmoid: http://kde-look.org/content/show.php/HoN-Stats?content=122784
In the file contents/code/main.js:83

It may be that the method for accessing lists from config files as changed, but I cannot find any info on this.

Reproducible: Always

Steps to Reproduce:
Try to read a StringList from a plasmoid's main.xml via plasmoid.readConfig() in a javascript plasmoid.

Actual Results:  
You get an object of type QVariant(QStringList) but who's methods are all undefined and which has no members or all members and methods are private.

Expected Results:  
An array of strings.

OS: Linux (x86_64) release 2.6.37.1-1.2-desktop, openSUSE 11.4rc2
Compiler: gcc
Comment 1 Pascal Ernst 2011-07-30 20:59:30 UTC
I can confirm that on a Kubuntu 11.04 with kde 4.6.2
Comment 2 Myriam Schweingruber 2012-05-22 21:08:11 UTC
Is this still valid for KDE 4.8.3 or trunk?
Comment 3 Andrew Crouthamel 2018-09-04 19:18:06 UTC
Hello! Plasma 4 was replaced by Plasma 5 four years ago by the KDE community. In that time we have made great strides in stability and functionality. We are closing all Plasma 4 bugs as most of them are no longer applicable to the new frameworks Plasma 5 is built upon. If you could, please re-test with the latest version of Plasma 5, and submit a new bug to "plasmashell" if you continue to have an issue. Thank you!