Bug 271533 - plasmoid fails to read values on initialization in the plasmoidviewer
Summary: plasmoid fails to read values on initialization in the plasmoidviewer
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-23 08:43 UTC by Nikita Melnichenko
Modified: 2014-11-03 20:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase, javaxscript plasmoid. (1.87 KB, application/octet-stream)
2011-04-23 08:43 UTC, Nikita Melnichenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Melnichenko 2011-04-23 08:43:46 UTC
Created attachment 59230 [details]
Testcase, javaxscript plasmoid.

Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

Plasmoid has different behavior when running on Plasma or Plasmoidviewer.

readConfig works well, when we use Plasma, and returns default values, when we use Plasmoidviewer. This is only about initialization, because readConfig reads values within callbacks like OnClick fine.

See the testcase. It a JS plasmoid, but I believe it's a general bug.

Reproducible: Always

Steps to Reproduce:
1. Run the testcase in the plasmoidviewer.
2. Click 'Test' button.
3. Rerun the testcase in the plasmoidviewer.

Actual Results:  
Running a testcase:

$ plasmoidviewer .
plasmoidviewer(15378)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(15378)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
Initial values: int = 0, string = []
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
clicked
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
Before-write values: int = 1, string = ok
After-write values: int = 1, string = ok
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:

$ plasmoidviewer .
plasmoidviewer(15378)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(15378)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
Initial values: int = 0, string = []
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(15378)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:


Expected Results:  
On the second run output should be:
Initial values: int = 1, string = ok

BTW, I'm not sure if Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) is good.

Please fix it, cause it's really hard to debug plasmoids. I have to either restart the Plasma or do a lot of clicks to add and remove plasmoids (that's BTW is not sufficient, cause I can't test restarts). With this bug plasmoid only works properly on Plasma. :(

There was no such a bug in the KDE SC 4.4.5.
Comment 1 Panard 2011-09-28 12:46:42 UTC
I can confirm this.
Another test is to start the comic applet: even if you configure it, at the next launch of plasmoidviewer, everything will restart from 0.
However, the plasmoidviewerrc seems to contain the right configuration... but it doesn't seem to load it.
Comment 2 Marco Martin 2011-12-06 23:42:37 UTC
config value restore works better in 4.7
Comment 3 JC Cardot 2014-11-03 20:59:23 UTC
Same problem here, in a plasmoid I'm developping in C++