Skip to content
  • Jasem Mutlaq's avatar
    User database simplification to fix Windows crash · b6ff9866
    Jasem Mutlaq authored
    According to Qt, we should not keep a reference to the database as a class variable as this may cause issues with opening and closing the database which had to be done explicitly. Despite that some queries did not work until we started cloning the database. Furthermore a Windows user reported crash that was due to an SQLQuery error probably due to some threading issue that is not well managed by one variable that is not mutexed.
    
    This change simplifies the database and follows Qt recommendation. The only issue I found is in the database test it fails since the file tested was /home/jasem/.qttest/share/testksuserdb/userdb.sqlite however, the parent directly /home/jasem/.qttest/share/testksuserdb was not created so the file was not created as a result. Not sure how it worked previously.
    b6ff9866