def resetPushButtonPressed(self, button): # create an object for PersepolisDB persepolis_db = PersepolisDB() # Reset data base persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # Reset persepolis_setting persepolis_setting = QSettings('persepolis_download_manager', 'persepolis') persepolis_setting.clear() persepolis_setting.sync()
def resetPushButtonPressed(self, button): # create an object for PersepolisDB persepolis_db = PersepolisDB() # Reset data base persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # Reset persepolis_setting persepolis_setting = QSettings('persepolis_download_manager', 'persepolis') persepolis_setting.clear() persepolis_setting.sync()
else: persepolis_setting.setValue('ui_direction', 'ltr') # compatibility persepolis_version = float(persepolis_setting.value('version/version', 2.5)) if persepolis_version < 2.6: from persepolis.scripts.compatibility import compatibility try: compatibility() except Exception as e: # create an object for PersepolisDB persepolis_db = PersepolisDB() # create tables persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # write error in log logger.sendToLog( "compatibility ERROR!", "ERROR") logger.sendToLog( str(e), "ERROR") persepolis_version = 2.6 if persepolis_version < 3.0: persepolis_setting.beginGroup('settings')
else: persepolis_setting.setValue('ui_direction', 'ltr') # compatibility persepolis_version = float(persepolis_setting.value('version/version', 2.5)) if persepolis_version < 2.6: from persepolis.scripts.compatibility import compatibility try: compatibility() except Exception as e: # create an object for PersepolisDB persepolis_db = PersepolisDB() # create tables persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # write error in log logger.sendToLog( "compatibility ERROR!", "ERROR") logger.sendToLog( str(e), "ERROR") persepolis_version = 2.6 if persepolis_version < 3.0: persepolis_setting.beginGroup('settings')