mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
fix: get device port error on linux
This commit is contained in:
parent
02857db1ab
commit
30bba9bbce
1 changed files with 7 additions and 4 deletions
|
@ -182,14 +182,17 @@ void Dialog::on_wirelessConnectBtn_clicked()
|
|||
return;
|
||||
}
|
||||
QString addr = ui->deviceIpEdt->text().trimmed();
|
||||
if (!ui->devicePortEdt->placeholderText().isEmpty()) {
|
||||
addr += ":";
|
||||
addr += ui->devicePortEdt->placeholderText().trimmed();
|
||||
}
|
||||
if (!ui->devicePortEdt->text().isEmpty()) {
|
||||
addr += ":";
|
||||
addr += ui->devicePortEdt->text().trimmed();
|
||||
} else if (!ui->devicePortEdt->placeholderText().isEmpty()) {
|
||||
addr += ":";
|
||||
addr += ui->devicePortEdt->placeholderText().trimmed();
|
||||
} else {
|
||||
outLog("error: device port is null", false);
|
||||
return;
|
||||
}
|
||||
|
||||
outLog("wireless connect...", false);
|
||||
QStringList adbArgs;
|
||||
adbArgs << "connect";
|
||||
|
|
Loading…
Add table
Reference in a new issue