Bug 212342 - [patch] System Monitor Disk Widget does not show disk space ("0" values, QVariant issue + Qt4.6)
Summary: [patch] System Monitor Disk Widget does not show disk space ("0" values, QVar...
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-systemmonitor (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 03:10 UTC by SlashDevDsp
Modified: 2009-12-14 17:42 UTC (History)
2 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 SlashDevDsp 2009-10-30 03:10:43 UTC
Version:            (using Devel)
Compiler:          g++ 4.3 
OS:                Linux
Installed from:    Compiled sources

The disk space system monitor widget does not show disk space - empty. see screen shot: http://img257.imageshack.us/img257/8262/snapshot2f.jpg

svn root repo:1042517
kde-qt: git
kdelibs:1042470
kdebase:1042510
Comment 1 Dario Andres 2009-10-31 04:20:34 UTC
Mh, I can confirm this here using:

Qt: 4.6.0 (Qt git branch 4.6 commit 52aef13521af2137db15ee878893f5c5150471e5
        Date:   Mon Oct 12 14:18:51 2009 +1000)
KDE: 4.3.73 (KDE 4.3.73 (KDE 4.4 >= 20091026))
kdelibs svn rev. 1041880 / kdebase svn rev. 1041881
on ArchLinux i686 - Kernel 2.6.30.6

I just checked, the soliddevice dataengine is properly calculating the free space value and setting it, however in the HardDiskMonitor widget, the "Plasma::DataEngine::Data" "data" map doesn't contain that key ("Free Space") and therefore the value is set to 0.

---

From the dataengine code:
" setData(name, I18N_NOOP("Free Space"), freeDiskVar );" 

freeDiskVar is a QVariant which was set to the "freeDisk"(qlonglong) value. 

This doesn't work, however if setData() is called with "freeDisk"(qlonglong) directly (avoiding the use of the QVariant var) it works...

@Aaron: does something changed regarding the DataEngine data values and QVariant handling? (may be with Qt4.6?)

Thanks
Comment 2 SlashDevDsp 2009-11-30 02:25:17 UTC
any updates? the bug seems to be still present.
Comment 3 Dario Andres 2009-11-30 13:03:16 UTC
I didn't commited the patch yet as I was waiting for Plasma developers to check this QVariant issue with the DataEngines (which could be a major problem and involve other dataengines as well....)
Thanks
Comment 4 SlashDevDsp 2009-12-14 16:37:34 UTC
looks like it is fixed now
Comment 5 Dario Andres 2009-12-14 17:42:10 UTC
Yes, I can confirm this is fixed here using:

Qt: 4.6.0 (kde-qt master commit cd8595efe9aace2afdaa5db37af7cfe82b87e4aa
        Date:   Wed Nov 18 01:33:21 2009 +0100)
KDE Development Platform: 4.3.81 (KDE 4.3.81 (KDE 4.4 >= 20091204))
kdelibs svn rev. 1060674 / kdebase svn rev. 1060675
on ArchLinux i686 - Kernel 2.6.31.6

Regards