void LogLoader::readLogConfigPath() { QSettings settings("Arena Tracker", "Arena Tracker"); logConfig = settings.value("logConfig", "").toString(); if(logConfig.isEmpty()) { logConfig = createDefaultLogConfig(); if(logConfig.isEmpty()) { logConfig = QFileDialog::getOpenFileName(0, tr("Find Hearthstone config log (log.config)"), QDir::homePath(), tr("log.config (log.config)")); } settings.setValue("logConfig", logConfig); if(!logConfig.isEmpty()) { //Remove old log.config QFile file(logConfig); if(file.exists()) file.remove(); checkLogConfig(); QMessageBox::information(0, tr("Restart Hearthstone"), tr("Restart Hearthstone (If running).")); } } else { checkLogConfig(); } emit pDebug("Path log.config: " + logConfig); emit pLog(tr("Settings: Path log.config: ") + logConfig); emit logConfigSet(); }
void LogLoader::readLogConfigPath() { QSettings settings("Arena Tracker", "Arena Tracker"); QString logConfig = settings.value("logConfig", "").toString(); if(logConfig.isEmpty()) { logConfig = createDefaultLogConfig(); if(logConfig.isEmpty()) { logConfig = QFileDialog::getOpenFileName(0, tr("Find Hearthstone config log (log.config)"), QDir::homePath(), tr("log.config (log.config)")); } settings.setValue("logConfig", logConfig); } if(!logConfig.isEmpty()) checkLogConfig(logConfig); emit pDebug("Path log.config: " + logConfig); emit pLog(tr("Settings: Path log.config: ") + logConfig); }