Call: Use signal slots uniformly for calling.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
#include "RemoteFile.h"
|
||||
#include "RemoteFile.h"
|
||||
|
||||
#include <InfoPack.hpp>
|
||||
|
||||
#include "LocalFile.h"
|
||||
|
||||
RemoteFile::RemoteFile(QObject* parent) : DirFileHelper(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void RemoteFile::setClientCore(ClientCore* cliCore)
|
||||
{
|
||||
cliCore_ = cliCore;
|
||||
cliCore_->SetPathCall(pathCall_);
|
||||
cliCore_->SetFileCall(fileCall_);
|
||||
connect(cliCore_, &ClientCore::sigPath, this, [this](const QString& path) { sigHome(path); });
|
||||
connect(cliCore_, &ClientCore::sigFiles, this, [this](const DirFileInfoVec& files) { sigDirFile(files); });
|
||||
}
|
||||
|
||||
bool RemoteFile::GetHome()
|
||||
@@ -21,6 +25,7 @@ bool RemoteFile::GetHome()
|
||||
bool RemoteFile::GetDirFile(const QString& dir)
|
||||
{
|
||||
InfoMsg info;
|
||||
info.msg = dir;
|
||||
auto frame = cliCore_->GetBuffer(info, FBT_CLI_ASK_DIRFILE, cliCore_->GetRemoteID());
|
||||
return ClientCore::asyncInvoke(cliCore_, [this, frame]() { return cliCore_->Send(frame); });
|
||||
}
|
||||
Reference in New Issue
Block a user