<table><tr><td style="">himanshuvishwakarma added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11034">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11034#inline-53360">View Inline</a><span style="color: #4b4d51; font-weight: bold;">jjazeix</span> wrote in <span style="color: #4b4d51; font-weight: bold;">ApplicationSettingsTest.cpp:93</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">It would be better to override the class with a constructor that initialize these fields.<br />
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 (<a href="https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92</a>)</p>

<p style="padding: 0; margin: 8px;">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.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">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,<br />
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 (<a href="https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/gcompris/GCompris-qt/blob/ba315944567ada9440b95f798887dbdc408074e6/src/core/ApplicationSettings.cpp#L92</a>)</p>

<p style="padding: 0; margin: 8px;">please give me any solution, link to tutorial or blog regarding the same.</p>

<p style="padding: 0; margin: 8px;">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.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R2 GCompris</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11034">https://phabricator.kde.org/D11034</a></div></div><br /><div><strong>To: </strong>himanshuvishwakarma, jjazeix, dmadaan, rudranilbasu, timotheegiet, GCompris<br /><strong>Cc: </strong>KDE Edu, GCompris, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, jjazeix, bcoudoin<br /></div>