Support for X-KDE-PluginInfo-EnabledByDefault
This commit is contained in:
parent
7e8f31b4be
commit
c9e67f3cf0
3 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue