diff --git a/daemon/device.cpp b/daemon/device.cpp index 5d3619198..dfcef41c8 100644 --- a/daemon/device.cpp +++ b/daemon/device.cpp @@ -76,7 +76,8 @@ void Device::reloadPlugins() foreach (const QString& pluginName, loader->getPluginList()) { const QString value = pluginStates.value(pluginName + QString::fromLatin1("Enabled"), QString()); - bool enabled = (value.isNull() ? true : QVariant(value).toBool()); //Enable all plugins by default + KPluginInfo plugininfo(pluginName); + bool enabled = (value.isNull() ? plugininfo.isPluginEnabledByDefault() : QVariant(value).toBool()); qDebug() << pluginName << "enabled:" << enabled; diff --git a/daemon/plugins/ping/kdeconnect_ping.desktop b/daemon/plugins/ping/kdeconnect_ping.desktop index 4fbe2a1a5..dfae169f9 100644 --- a/daemon/plugins/ping/kdeconnect_ping.desktop +++ b/daemon/plugins/ping/kdeconnect_ping.desktop @@ -9,5 +9,6 @@ X-KDE-PluginInfo-Name=kdeconnect_ping X-KDE-PluginInfo-Version=0.1 X-KDE-PluginInfo-Website=http://albertvaka.wordpress.com X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true Name=Ping Comment=Send and receive pings diff --git a/daemon/plugins/ping/pingplugin.cpp b/daemon/plugins/ping/pingplugin.cpp index 4288bb48e..2532edec1 100644 --- a/daemon/plugins/ping/pingplugin.cpp +++ b/daemon/plugins/ping/pingplugin.cpp @@ -30,7 +30,7 @@ K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_ping", "kdeconnect_ping") ) PingPlugin::PingPlugin(QObject* parent, const QVariantList& args) : KdeConnectPlugin(parent, args) { - qDebug() << "Plugin constructor for device" << device()->name(); + qDebug() << "Ping plugin constructor for device" << device()->name(); } bool PingPlugin::receivePackage(const NetworkPackage& np)