Commit 3f8b2e0b authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Remove stub file backend

The NetworkManager backend is preferred, let's see if this causes actual
problems first before adding another backend.
parent 30b1f1d3
......@@ -5,22 +5,3 @@
*/
#include "NetworkBackend.h"
FileBackend::FileBackend(QObject* parent)
{
}
bool FileBackend::isSupported()
{
return false;
}
void FileBackend::start()
{
}
void FileBackend::stop()
{
}
......@@ -26,15 +26,3 @@ public:
Q_SIGNAL void deviceAdded(NetworkDevice *device);
Q_SIGNAL void deviceRemoved(NetworkDevice *device);
};
class FileBackend : public NetworkBackend
{
Q_OBJECT
public:
FileBackend(QObject *parent = nullptr);
bool isSupported() override;
void start() override;
void stop() override;
};
......@@ -48,11 +48,7 @@ NetworkPlugin::NetworkPlugin(QObject *parent, const QVariantList &args)
d->backend = new NetworkManagerBackend(this);
if (!d->backend->isSupported()) {
delete d->backend;
d->backend = new FileBackend(this);
if (!d->backend->isSupported()) {
qWarning() << "Unable to start backend, network information not available.";
return;
}
qWarning() << "Unable to start backend, network information not available.";
}
connect(d->backend, &NetworkBackend::deviceAdded, this, &NetworkPlugin::onDeviceAdded);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment