storing KConfig in sidebar broken

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

storing KConfig in sidebar broken

Marcel Wiesweg
Hi,

the sidebar widgets store their config in the destructor.
The config group is hardcoded ("Image Properties SideBar")
But: We have four sidebars (main view, editor, bqm, 2*lighttable).
Only the widget deleted last will save the config, isn't it?

Marcel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: storing KConfig in sidebar broken

Gilles Caulier-4
Ah... and it do not use QObject name as "Image Properties SideBar" + name ?

This is that i have implemented before Qt4 model view port.

Gilles Caulier

2010/12/13 Marcel Wiesweg <[hidden email]>:

> Hi,
>
> the sidebar widgets store their config in the destructor.
> The config group is hardcoded ("Image Properties SideBar")
> But: We have four sidebars (main view, editor, bqm, 2*lighttable).
> Only the widget deleted last will save the config, isn't it?
>
> Marcel
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: storing KConfig in sidebar broken

Marcel Wiesweg

> Ah... and it do not use QObject name as "Image Properties SideBar" + name ?
>
> This is that i have implemented before Qt4 model view port.

The config group name is hardcoded in several places:

grep '"Image Properties SideBar"' -rl . | grep -v svn
./core/libs/imageproperties/imagepropertiesversionstab.cpp
./core/libs/imageproperties/imagepropertiesmetadatatab.cpp
./core/libs/imageproperties/imagedescedittab.cpp
./core/libs/imageproperties/imagepropertiesgpstab.cpp
./core/libs/imageproperties/imagepropertiescolorstab.cpp
./core/libs/widgets/metadata/metadatapanel.cpp

The solution would be a central place in ImagePropertiesSideBarDB which
creates the KConfigGroup and passes it to all tabs' readConfig/writeConfig.
Alternatively (and better), porting to StateSavingObject?

Marcel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel