Review Request: Make the writeConfig() method a public slot
Laszlo Papp
lpapp at kde.org
Mon Jan 30 20:57:22 GMT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103829/
-----------------------------------------------------------
Review request for kdelibs and David Faure.
Description
-------
According to the kconfig-xt example [1], it seems to me we need to call this
method for settings changing. Therefore, it is not enough to just set the
certain properties separately. I currently need to wrap this writeConfig()
method in a helper class in order to get an invokable or slot version.
There are at least two ways of addressing the issue in question:
1) Make the current method Q_INVOKABLE
2) Make the method actually a slot
I personally chose the second alternative since the method already returns
void, thus a potential candidate for being a slot. According to the Qt
documentation, it is not a problem for having a virtual (public) slot:
"You can also define slots to be virtual, which we have found quite useful in
practice."
[1] http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT#Example
Diffs
-----
kdecore/config/kcoreconfigskeleton.h b42ff22
Diff: http://git.reviewboard.kde.org/r/103829/diff/diff
Testing
-------
Tested on Archlinux for building only.
Thanks,
Laszlo Papp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120130/991487c0/attachment.htm>
More information about the kde-core-devel
mailing list