def sync(self, load=True): try: Settings.set(self.kBrokerList, json.dumps(self._brokers)) except Exception as e: Log.critical(e) if load: self.load()
def sync(self, load=True): try: Settings.set(self.kBrokerList,json.dumps(self._brokers)) except Exception as e: Log.critical(e) if load: self.load()
def _file(self): if self._jsonfile == self._defaultFile: fileName = QFileDialog.getSaveFileName(None, "Location for Brokers File", # translate "~/", "*.json") if fileName: Settings.set(self.kBrokerFile, fileName) self._jsonfile = fileName else: Log.critical("Broker data being saved to plugin directory and will be lost on upgrade!") return self._jsonfile
def _file(self): if self._jsonfile == self._defaultFile: fileName = QFileDialog.getSaveFileName( None, "Location for Brokers File", # translate "~/", "*.json") if fileName: Settings.set(self.kBrokerFile, fileName) self._jsonfile = fileName else: Log.critical( "Broker data being saved to plugin directory and will be lost on upgrade!" ) return self._jsonfile