| 28 | ClientDevice::~ClientDevice() = default; |
| 29 | |
| 30 | ClientDevice *ClientDevice::create(const QUrl &url, QObject *parent) |
| 31 | { |
| 32 | ClientDevice *device = nullptr; |
| 33 | if (url.scheme() == QLatin1String("tcp")) |
| 34 | device = new TcpClientDevice(parent); |
| 35 | else if (url.scheme() == QLatin1String("local")) |
| 36 | device = new LocalClientDevice(parent); |
| 37 | |
| 38 | if (!device) { |
| 39 | qWarning() << "Unsupported transport protocol:" << url.toString(); |
| 40 | return nullptr; |
| 41 | } |
| 42 | |
| 43 | device->m_serverAddress = url; |
| 44 | return device; |
| 45 | } |
| 46 | |
| 47 | void ClientDevice::setTryAgain(int tries) |
| 48 | { |
no outgoing calls