D11034: CoreApplicationSettingsTest

Himanshu Vishwakarma noreply at phabricator.kde.org
Sat Mar 10 12:51:02 UTC 2018


himanshuvishwakarma added inline comments.

INLINE COMMENTS

> jjazeix wrote in ApplicationSettingsTest.cpp:93
> It would be better to override the class with a constructor that initialize these fields.
> The most important part is that on this file, we are writing on the configuration. You also need to override it to not change the real configuration (https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92)
> 
> It would be nice to also test the content of the configuration file at the end of the function to be sure all the content has been written as expected.

Yes, it changed the settings of the application. So As per your recommendation, I have created a DummyApplicationSettings class in the unit test and inherited from ApplicationSettings class and in the constructor of the class I override and initialized these fields with NULL,
but unable to override the real configuration because the m_config is in the private member. And NO any other method is coming to me to override real configuration (https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92)

please give me any solution, link to tutorial or blog regarding the same.

One another thing we may introduce in our GCompris is RestoreDefaultSettings(A member function of class ApplicationSettings) in the settings section by which the user can restore all default settings.

REPOSITORY
  R2 GCompris

REVISION DETAIL
  https://phabricator.kde.org/D11034

To: himanshuvishwakarma, jjazeix, dmadaan, rudranilbasu, timotheegiet, #gcompris
Cc: #kde_edu, #gcompris, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, jjazeix, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180310/d754902d/attachment.html>


More information about the kde-edu mailing list