From 6a1dec87556bc589175885326706a9a1ea6bc24f Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Wed, 29 Oct 2025 06:13:40 +0800 Subject: [PATCH] chore: rename --- CMakeLists.txt | 2 +- include/ui/mainwindow.h | 4 ++-- res/translations/fa_IR.ts | 4 ++-- res/translations/ru_RU.ts | 4 ++-- res/translations/zh_CN.ts | 4 ++-- src/ui/mainwindow.cpp | 2 +- src/ui/{mainwindow_grpc.cpp => mainwindow_rpc.cpp} | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) rename src/ui/{mainwindow_grpc.cpp => mainwindow_rpc.cpp} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2369e1..d9397a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,7 @@ set(PROJECT_SOURCES src/ui/setting/ThemeManager.cpp src/ui/setting/Icon.cpp - src/ui/mainwindow_grpc.cpp + src/ui/mainwindow_rpc.cpp src/ui/mainwindow.cpp include/ui/mainwindow.h include/ui/mainwindow.ui diff --git a/include/ui/mainwindow.h b/include/ui/mainwindow.h index 56e1052..21ee75c 100644 --- a/include/ui/mainwindow.h +++ b/include/ui/mainwindow.h @@ -254,9 +254,9 @@ private: void loadShortcuts(); - // grpc + // rpc - static void setup_grpc(); + static void setup_rpc(); void urltest_current_group(const QList>& profiles); diff --git a/res/translations/fa_IR.ts b/res/translations/fa_IR.ts index 2d0bac7..fd0e2dc 100644 --- a/res/translations/fa_IR.ts +++ b/res/translations/fa_IR.ts @@ -1991,8 +1991,8 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun نمایه دیگری در حال توقف است... - Try to start the config, but the core has not listened to the grpc port, so restart it... - تلاش برای شروع پیکربندی، اما هسته به پورت grpc گوش نداده است، بنابراین آن را دوباره راه‌اندازی کنید... + Try to start the config, but the core has not listened to the RPC port, so restart it... + تلاش برای شروع پیکربندی، اما هسته به پورت RPC گوش نداده است، بنابراین آن را دوباره راه‌اندازی کنید... Stop return error diff --git a/res/translations/ru_RU.ts b/res/translations/ru_RU.ts index 1382586..7369918 100644 --- a/res/translations/ru_RU.ts +++ b/res/translations/ru_RU.ts @@ -1993,8 +1993,8 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun Другой профиль останавливается... - Try to start the config, but the core has not listened to the grpc port, so restart it... - Попытка запустить конфигурацию — ядро не прослушивает порт gRPC, поэтому перезапустите его... + Try to start the config, but the core has not listened to the RPC port, so restart it... + Попытка запустить конфигурацию — ядро не прослушивает порт RPC, поэтому перезапустите его... Stop return error diff --git a/res/translations/zh_CN.ts b/res/translations/zh_CN.ts index 2dfe9e2..ef4ec7d 100644 --- a/res/translations/zh_CN.ts +++ b/res/translations/zh_CN.ts @@ -1991,8 +1991,8 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun 另一个配置档正在停止... - Try to start the config, but the core has not listened to the grpc port, so restart it... - 尝试启动该配置,但核心尚未监听到 grpc 端口,因此请重启它... + Try to start the config, but the core has not listened to the RPC port, so restart it... + 尝试启动该配置,但核心尚未监听到 RPC 端口,因此请重启它... Stop return error diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index a8b40ec..760e6c1 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -164,7 +164,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi core_process->start_profile_when_core_is_up = Configs::dataStore->remember_id; } // Setup - setup_grpc(); + setup_rpc(); core_process->Start(); }, DS_cores); diff --git a/src/ui/mainwindow_grpc.cpp b/src/ui/mainwindow_rpc.cpp similarity index 99% rename from src/ui/mainwindow_grpc.cpp rename to src/ui/mainwindow_rpc.cpp index 6a3b191..dd2df87 100644 --- a/src/ui/mainwindow_grpc.cpp +++ b/src/ui/mainwindow_rpc.cpp @@ -12,11 +12,11 @@ #include #include -// grpc +// rpc using namespace API; -void MainWindow::setup_grpc() { +void MainWindow::setup_rpc() { // Setup Connection defaultClient = new Client( [=](const QString &errStr) { @@ -552,7 +552,7 @@ void MainWindow::profile_start(int _id) { if (!Configs::dataStore->core_running) { runOnThread( [=, this] { - MW_show_log(tr("Try to start the config, but the core has not listened to the grpc port, so restart it...")); + MW_show_log(tr("Try to start the config, but the core has not listened to the RPC port, so restart it...")); core_process->start_profile_when_core_is_up = ent->id; core_process->Restart(); },