KNM config synchronization bug
Gökçen Eraslan
gokcen at pardus.org.tr
Thu Nov 18 17:21:44 CET 2010
Hello,
I've found a bug in KNM and looked at the code to fix it. Firstly, here are
the steps to reproduce it:
1- Open plasma applet and click Manage Connections
2- Create a new connection and close the dialog
3- Right click on the plasma applet and click on Network Management Settings
4- You will not see the new connection that is just created.
Attached patch fixes this and works well. But I don't know the
inner details about the bug. Even if configuration is changed,
QStringList connectionIds = KNetworkManagerServicePrefs::self()-
>connections();
line in manageconnectionwidget.cpp returns old connection list. But this is
only happened in applet configuration. If KCModule is accessed from
systemsettings or Manage Connections button of applet, list is always up-to-
date.
My guess about the problem is, configuration cache is process wide and filled
in the first run which is the start of plasma for the applet, and later even
if a new config instance is created using
KNetworkManagerServicePrefs::instance(Knm::ConnectionPersistence::NETWORKMANAGEMENT_RCFILE)
cache needs to be invalidated. But for systemsettings, since every time a new
process is created, cache is always up-to-date.
What are your opinions? Do you agree with the patch?
PS: Better to use this list, thank you Will.
Cheers.
--
Gökçen Eraslan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: workaround-for-manage-connection-widget-sync.diff
Type: text/x-patch
Size: 635 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-networkmanager/attachments/20101118/bbea509a/attachment.diff
More information about the kde-networkmanager
mailing list