diff --git a/tools/chatgui/src/main.cpp b/tools/chatgui/src/main.cpp index 308c85e0..d92c88fc 100644 --- a/tools/chatgui/src/main.cpp +++ b/tools/chatgui/src/main.cpp @@ -130,22 +130,14 @@ int main(int argc, char *argv[]) { if (!QDir::isAbsolutePath(dbPath)) dbPath = QCoreApplication::applicationDirPath() + "/" + dbPath; QDir(dbPath).mkpath("."); - if (cfg.dbPath() != dbPath) { - cfg.setDbPath(dbPath); - cfg.save(); - } QString debugFile = cfg.debugFile(); if (debugFile.isEmpty()) debugFile = "chatgui.log"; if (!QDir::isAbsolutePath(debugFile)) debugFile = QCoreApplication::applicationDirPath() + "/" + debugFile; - if (cfg.debugFile() != debugFile) { - cfg.setDebugFile(debugFile); - cfg.save(); - } DbManager db; - MainWindow w(nullptr, &db, cfgPath, dbPath, cfg.debugFile(), + MainWindow w(nullptr, &db, cfgPath, dbPath, debugFile, cfg.debugLevel(), cfg.debugCategories()); w.show(); diff --git a/tools/chatgui/transport/node_config.cpp b/tools/chatgui/transport/node_config.cpp index 20739a2b..76637069 100644 --- a/tools/chatgui/transport/node_config.cpp +++ b/tools/chatgui/transport/node_config.cpp @@ -358,7 +358,6 @@ bool NodeConfig::saveFull() { if (!m_privKey.isEmpty()) out << "my_private_key=" << m_privKey << "\n"; if (!m_pubKey.isEmpty()) out << "my_public_key=" << m_pubKey << "\n"; out << "auto_sockets=" << (m_autoSockets ? "yes" : "no") << "\n"; - out << "db_path=" << (m_dbPath.isEmpty() ? "chat_data" : m_dbPath) << "\n"; out << "\n"; for (auto& srv : m_servers) { @@ -433,7 +432,6 @@ bool NodeConfig::save() { config_update_in_lines(lines, "global", "my_private_key", m_privKey, true); config_update_in_lines(lines, "global", "my_public_key", m_pubKey, true); config_update_in_lines(lines, "global", "auto_sockets", m_autoSockets ? "yes" : "no", true); - config_update_in_lines(lines, "global", "db_path", m_dbPath.isEmpty() ? "chat_data" : m_dbPath, true); if (!m_controlAddr.isEmpty()) { int sep = m_controlAddr.lastIndexOf(':');