D11034: CoreApplicationSettingsTest

Johnny Jazeix noreply at phabricator.kde.org
Thu Mar 15 07:47:20 UTC 2018


jjazeix added a comment.


  In D11034#224142 <https://phabricator.kde.org/D11034#224142>, @himanshuvishwakarma wrote:
  
  > 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.
  
  
  If you need to add some protected methods to change the settings, you can

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/20180315/bbd4aa32/attachment.html>


More information about the kde-edu mailing list