[cli] Warn user if specified device id doesn't exist
This commit is contained in:
parent
01fa989786
commit
c8c82e01a7
1 changed files with 5 additions and 0 deletions
|
@ -183,6 +183,11 @@ int main(int argc, char** argv)
|
||||||
parser.showHelp(1);
|
parser.showHelp(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!blockOnReply<QStringList>(iface.devices(false, false)).contains(device)) {
|
||||||
|
QTextStream(stderr) << "Couldn't find device with id \"" << device << "\". To specify a device by name use -n <devicename>" << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (parser.isSet(QStringLiteral("share"))) {
|
if (parser.isSet(QStringLiteral("share"))) {
|
||||||
QStringList urls;
|
QStringList urls;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue