🐞 fix(文件传输): 修改对于右键发送文件的处理
添加标志位对于右键发送文件的路径做处理 157075 【多端协同】平板模式下建立链接后,在麒麟设备选择文件-右键选择发送到多端协同,一直显示在加载中,无传输进度条显示,需要重启多端协同应用可以恢复(复现概率:3/6)
This commit is contained in:
parent
92fc40013c
commit
68c8fe3eba
|
@ -877,6 +877,7 @@ void MainWindow::setLocalPathList(const QStringList &list)
|
|||
qInfo() << "peony menu send: not current connect";
|
||||
return;
|
||||
}
|
||||
m_isDusUpload = true;
|
||||
if (m_connectInfo.deviceType == ConnectionService::DeviceType::ANDROID) {
|
||||
slotUploadFile("/Download", list);
|
||||
} else if (m_connectInfo.deviceType == ConnectionService::DeviceType::PC) {
|
||||
|
@ -1628,19 +1629,25 @@ void MainWindow::slotUploadFile(QString dirName, const QStringList &localPathLis
|
|||
{
|
||||
// 上传文件埋点
|
||||
GenerateTools::buriedPoint(kabase::BuriedPoint::PT::KylinMobileAssistantUploadFile);
|
||||
QStringList pathList = m_fileManageWin->getPathList();
|
||||
pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::Storage));
|
||||
pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::FileList));
|
||||
pathList.removeAll(m_connectInfo.deviceName);
|
||||
m_uploadPath = "/";
|
||||
m_uploadPath.append(pathList.join("/"));
|
||||
if (!dirName.isEmpty()) {
|
||||
if (m_uploadPath == "/") {
|
||||
m_uploadPath.append(dirName);
|
||||
} else {
|
||||
m_uploadPath.append("/" + dirName);
|
||||
}
|
||||
if (m_isDusUpload) {
|
||||
m_isDusUpload = false;
|
||||
m_uploadPath = dirName;
|
||||
m_fileManageWin->load();
|
||||
} else {
|
||||
QStringList pathList = m_fileManageWin->getPathList();
|
||||
pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::Storage));
|
||||
pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::FileList));
|
||||
pathList.removeAll(m_connectInfo.deviceName);
|
||||
m_uploadPath = "/";
|
||||
m_uploadPath.append(pathList.join("/"));
|
||||
if (!dirName.isEmpty()) {
|
||||
if (m_uploadPath == "/") {
|
||||
m_uploadPath.append(dirName);
|
||||
} else {
|
||||
m_uploadPath.append("/" + dirName);
|
||||
}
|
||||
m_fileManageWin->load();
|
||||
}
|
||||
}
|
||||
m_ftpClient->setTransferMode(QFtp::Passive);
|
||||
m_ftpClient->uploadAllFiles(localPathList, m_uploadPath);
|
||||
|
|
|
@ -267,6 +267,7 @@ private:
|
|||
QString m_tipMesseage = ""; // 提示消息
|
||||
PublicAttributes::Theme m_theme = PublicAttributes::Theme::Light; // 主题
|
||||
bool m_isDownloadingThumbanil = false;
|
||||
bool m_isDusUpload = false;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
Loading…
Reference in New Issue