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

@@ -14,7 +14,8 @@ 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.")); });
connect(clientCore_, &ClientCore::connecting, this, [this]() { qInfo() << QString(tr("Connecting...")); });

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_;
};