<table><tr><td style="">himanshuvishwakarma added a comment.
</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><div><p>yes, I agree with you that if the test is crash during the running it will change the default settings of the application.</p>

<p>So, I think that the solution is that, I don't have to use the main settings( ~/.config/gcompris/gcompris-qt.conf ) of the application in our unit test. To achieve this, I tried with making DummyApplicationSettings class by inheriting the ApplicationSettings class and change access specifiers of m_config to protected and then tried to change the config file location but there is NO any function in the QSettings to change the location of the config file. So dummy class also changed the main settings of the application while running the test.</p>

<p>The main problem is NO way to change the default location of the config file in the object of QSettings class.</p>

<p>maybe wrong approach.<br />
or<br />
maybe some other method may present to do the tests. but presently I have no idea what to do next in this test, I am searching... if anything I will get, I will update the diff.</p></div></div><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-54670">View Inline</a><span style="color: #4b4d51; font-weight: bold;">jjazeix</span> wrote in <span style="color: #4b4d51; font-weight: bold;">CMakeLists.txt:15</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">can you do a macro or function to avoid duplicating these 3 lines everytime?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Nice Idea ;-)<br />
I will update in the next diff.</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>