From d092f649ac6b8c20af8e95ffca6ae3dc759b3165 Mon Sep 17 00:00:00 2001 From: evgeny Date: Fri, 4 Sep 2026 14:34:39 +0300 Subject: [PATCH] =?UTF-8?q?chatgui:=20=D0=BF=D1=83=D1=82=D0=B8=20db=20?= =?UTF-8?q?=D0=B8=20=D0=BB=D0=BE=D0=B3=D0=B0=20=D0=BE=D1=82=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=B2?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B5,=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B7=D0=BE=D0=BB=D0=B2=20=D0=BA=20=D0=B1=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?=D1=80=D0=BD=D0=B8=D0=BA=D1=83=20=D0=B2=20=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=D0=B9=D0=BC=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/chatgui/src/main.cpp | 10 +--------- tools/chatgui/transport/node_config.cpp | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) 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(':');