fix: console not trans file bug.
This commit is contained in:
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis",
|
||||
"args": []
|
||||
"args": ["127.0.0.1", "9009"]
|
||||
},
|
||||
"cmake.configureArgs": [
|
||||
"-Wno-dev"
|
||||
|
||||
@@ -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.")); });
|
||||
|
||||
@@ -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_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user