fix: console not trans file bug.

This commit is contained in:
2025-06-21 12:15:38 +08:00
parent d4b36c2137
commit 0fb6e01723
3 changed files with 5 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
}
],
"visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis",
"args": []
"args": ["127.0.0.1", "9009"]
},
"cmake.configureArgs": [
"-Wno-dev"

View File

@@ -14,6 +14,7 @@ void ConsoleHelper::RunWorker(ClientCore* clientCore)
sockWorker_ = new SocketWorker(clientCore_, nullptr);
clientCore_->moveToThread(sockWorker_);
fileTrans_ = new FileTrans(clientCore_);
connect(clientCore_, &ClientCore::conSuccess, this, [this]() { qInfo() << QString(tr("Connected.")); });
connect(clientCore_, &ClientCore::conFailed, this, [this]() { qInfo() << QString(tr("Connect failed.")); });

View File

@@ -2,6 +2,7 @@
#define CONSOLE_H
#include <ClientCore.h>
#include <FileTrans.h>
class ConsoleHelper : public QObject
{
@@ -22,6 +23,7 @@ signals:
private:
QString ip_;
quint16 port_{};
FileTrans* fileTrans_{};
SocketWorker* sockWorker_{};
ClientCore* clientCore_;
};