mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-22 12:34:58 +00:00
fix: drop file on group control
This commit is contained in:
parent
e45a3e9c17
commit
4a64f403c4
3 changed files with 8 additions and 6 deletions
|
@ -173,8 +173,10 @@ void Device::initSignals()
|
|||
connect(this, &Device::switchFullScreen, m_videoForm, &VideoForm::onSwitchFullScreen);
|
||||
}
|
||||
if (m_fileHandler) {
|
||||
connect(this, &Device::pushFileRequest, m_fileHandler, &FileHandler::onPushFileRequest);
|
||||
connect(this, &Device::installApkRequest, m_fileHandler, &FileHandler::onInstallApkRequest);
|
||||
connect(this, &Device::pushFileRequest, this, [this](const QString &file, const QString &devicePath) {
|
||||
m_fileHandler->onPushFileRequest(getSerial(), file, devicePath);
|
||||
});
|
||||
connect(this, &Device::installApkRequest, this, [this](const QString &apkFile) { m_fileHandler->onInstallApkRequest(getSerial(), apkFile); });
|
||||
connect(m_fileHandler, &FileHandler::fileHandlerResult, this, [this](FileHandler::FILE_HANDLER_RESULT processResult, bool isApk) {
|
||||
QString tipsType = "";
|
||||
if (isApk) {
|
||||
|
|
|
@ -75,8 +75,8 @@ signals:
|
|||
void requestDeviceClipboard();
|
||||
void setDeviceClipboard();
|
||||
void clipboardPaste();
|
||||
void pushFileRequest(const QString &serial, const QString &file, const QString &devicePath = "");
|
||||
void installApkRequest(const QString &serial, const QString &apkFile);
|
||||
void pushFileRequest(const QString &file, const QString &devicePath = "");
|
||||
void installApkRequest(const QString &apkFile);
|
||||
|
||||
// key map
|
||||
void mouseEvent(const QMouseEvent *from, const QSize &frameSize, const QSize &showSize);
|
||||
|
|
|
@ -712,8 +712,8 @@ void VideoForm::dropEvent(QDropEvent *event)
|
|||
}
|
||||
|
||||
if (fileInfo.isFile() && fileInfo.suffix() == "apk") {
|
||||
emit m_device->installApkRequest(m_device->getSerial(), file);
|
||||
emit m_device->installApkRequest(file);
|
||||
return;
|
||||
}
|
||||
emit m_device->pushFileRequest(m_device->getSerial(), file, Config::getInstance().getPushFilePath() + fileInfo.fileName());
|
||||
emit m_device->pushFileRequest(file, Config::getInstance().getPushFilePath() + fileInfo.fileName());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue