1 Star 0 Fork 16

weinkym/qipmsg

forked from caowai/qipmsg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ipmsgfilerecv.cpp 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
#include "ipmsgfilerecv.h"
IpMsgFileRecv::IpMsgFileRecv(IpMsgUser *user,fileEntryT *file, QObject *parent) : QObject(parent)
{
QThread *thread = new QThread();
client = new IpMsgFileClient(user);
client->recvFileInfo.info.fileName = file->info.fileName;
client->recvFileInfo.info.size = file->info.size;
client->recvFileInfo.info.size = file->info.size;
client->recvFileInfo.info.permission = file->info.permission;
client->recvFileInfo.info.absoluteFilePath = file->info.absoluteFilePath;
client->recvFileInfo.info.metadataChangeTime = file->info.metadataChangeTime;
client->recvFileInfo.fileHost = file->fileHost;
client->recvFileInfo.fileId = file->fileId;
client->recvFileInfo.fileOut = file->fileOut;
client->recvFileInfo.filePort = file->filePort;
client->recvFileInfo.fileTranStatus = FILE_TRANS_STATUS_RUN;
client->recvFileInfo.fileOffset = 0;
client->moveToThread(thread);
connect(thread,SIGNAL(started()),client,SLOT(ipMsgFileClientStart()));
connect(thread,SIGNAL(finished()),thread,SLOT(deleteLater()));
connect(thread,SIGNAL(finished()),client,SLOT(deleteLater()));
connect(thread,SIGNAL(finished()),this,SLOT(deleteLater()));
connect(this,SIGNAL(fileRecvCancel()),client,SLOT(ipMsgFileClientClose()));
thread->start();
}
void IpMsgFileRecv::ipMsgFileClientCancel(fileEntryT *file)
{
if(client != nullptr)
{
if(client->recvFileInfo.fileId == file->fileId)
{
emit fileRecvCancel();
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/weinkym/qipmsg.git
[email protected]:weinkym/qipmsg.git
weinkym
qipmsg
qipmsg
master

搜索帮助