D11034: CoreApplicationSettingsTest

Himanshu Vishwakarma noreply at phabricator.kde.org
Mon Mar 12 16:54:45 UTC 2018


himanshuvishwakarma added a comment.


  yes, I agree with you that if the test is crash during the running it will change the default settings of the application.
  
  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.
  
  The main problem is NO way to change the default location of the config file in the object of QSettings class.
  
  maybe wrong approach.
  or
  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.

INLINE COMMENTS

> jjazeix wrote in CMakeLists.txt:15
> can you do a macro or function to avoid duplicating these 3 lines everytime?

Nice Idea ;-)
I will update in the next diff.

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/20180312/f4017a04/attachment.html>


More information about the kde-edu mailing list