func:添加显示驱动器。
This commit is contained in:
@@ -152,6 +152,7 @@ void ClientCore::UseFrame(QSharedPointer<FrameBuffer> frame)
|
||||
case FrameBufferType::FBT_CLI_ASK_HOME: {
|
||||
InfoMsg info;
|
||||
info.msg = Util::GetUserHome();
|
||||
info.list = Util::GetLocalDrivers();
|
||||
if (!Send<InfoMsg>(info, FBT_CLI_ANS_HOME, frame->fid)) {
|
||||
qCritical() << QString(tr("send home failed."));
|
||||
return;
|
||||
@@ -161,7 +162,7 @@ void ClientCore::UseFrame(QSharedPointer<FrameBuffer> frame)
|
||||
case FrameBufferType::FBT_CLI_ANS_HOME: {
|
||||
InfoMsg info = infoUnpack<InfoMsg>(frame->data);
|
||||
qInfo() << QString(tr("用户目录:%1")).arg(info.msg);
|
||||
emit sigPath(info.msg);
|
||||
emit sigPath(info.msg, info.list);
|
||||
break;
|
||||
}
|
||||
case FrameBufferType::FBT_SER_MSG_FORWARD_FAILED: {
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
signals:
|
||||
void sigDisconnect();
|
||||
void sigPath(const QString& path);
|
||||
void sigPath(const QString& path, const QStringList& drivers);
|
||||
void sigClients(const InfoClientVec& clients);
|
||||
void sigFiles(const DirFileInfoVec& files);
|
||||
void sigReqSend(QSharedPointer<FrameBuffer> frame);
|
||||
|
||||
@@ -11,7 +11,8 @@ RemoteFile::RemoteFile(QObject* parent) : DirFileHelper(parent)
|
||||
void RemoteFile::setClientCore(ClientCore* cliCore)
|
||||
{
|
||||
cliCore_ = cliCore;
|
||||
connect(cliCore_, &ClientCore::sigPath, this, [this](const QString& path) { sigHome(path); });
|
||||
connect(cliCore_, &ClientCore::sigPath, this,
|
||||
[this](const QString& path, const QStringList& drivers) { sigHome(path, drivers); });
|
||||
connect(cliCore_, &ClientCore::sigFiles, this, [this](const DirFileInfoVec& files) { sigDirFile(files); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user