Rename missingPlugins to unsupportedPlugins
This commit is contained in:
parent
617b66aeb8
commit
6a379e9227
4 changed files with 9 additions and 9 deletions
|
@ -110,7 +110,7 @@ void Device::reloadPlugins()
|
|||
QMultiMap<QString, KdeConnectPlugin*> newPluginsByIncomingInterface;
|
||||
QMultiMap<QString, KdeConnectPlugin*> newPluginsByOutgoingInterface;
|
||||
QSet<QString> supportedIncomingInterfaces;
|
||||
QStringList missingPlugins;
|
||||
QStringList unsupportedPlugins;
|
||||
|
||||
if (isPaired() && isReachable()) { //Do not load any plugin for unpaired devices, nor useless loading them for unreachable devices
|
||||
|
||||
|
@ -139,7 +139,7 @@ void Device::reloadPlugins()
|
|||
) {
|
||||
qCWarning(KDECONNECT_CORE) << "not loading " << pluginName << "because of unmatched capabilities";
|
||||
delete plugin;
|
||||
missingPlugins.append(pluginName);
|
||||
unsupportedPlugins.append(pluginName);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ void Device::reloadPlugins()
|
|||
m_pluginsByOutgoingInterface = newPluginsByOutgoingInterface;
|
||||
m_supportedIncomingInterfaces = newSupportedIncomingInterfaces;
|
||||
m_pluginsByIncomingInterface = newPluginsByIncomingInterface;
|
||||
m_missingPlugins = missingPlugins;
|
||||
m_unsupportedPlugins = unsupportedPlugins;
|
||||
|
||||
Q_FOREACH(KdeConnectPlugin* plugin, m_plugins) {
|
||||
plugin->connected();
|
||||
|
|
|
@ -45,7 +45,7 @@ class KDECONNECTCORE_EXPORT Device
|
|||
Q_PROPERTY(QString statusIconName READ statusIconName)
|
||||
Q_PROPERTY(bool isReachable READ isReachable NOTIFY reachableStatusChanged)
|
||||
Q_PROPERTY(bool isPaired READ isPaired NOTIFY pairingChanged)
|
||||
Q_PROPERTY(QStringList missingPlugins READ missingPlugins NOTIFY pluginsChanged)
|
||||
Q_PROPERTY(QStringList unsupportedPlugins READ unsupportedPlugins NOTIFY pluginsChanged)
|
||||
|
||||
enum PairStatus {
|
||||
NotPaired,
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
QString type() const { return type2str(m_deviceType); };
|
||||
QString iconName() const;
|
||||
QString statusIconName() const;
|
||||
QStringList missingPlugins() const { return m_missingPlugins; }
|
||||
QStringList unsupportedPlugins() const { return m_unsupportedPlugins; }
|
||||
|
||||
//Add and remove links
|
||||
void addLink(const NetworkPackage& identityPackage, DeviceLink*);
|
||||
|
@ -159,7 +159,7 @@ private: //Fields (TODO: dPointer!)
|
|||
QSet<QString> m_incomingCapabilities;
|
||||
QSet<QString> m_outgoingCapabilities;
|
||||
QStringList m_supportedIncomingInterfaces;
|
||||
QStringList m_missingPlugins;
|
||||
QStringList m_unsupportedPlugins;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Device*)
|
||||
|
|
|
@ -218,7 +218,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
|||
QList<KPluginInfo> pluginInfo = KPluginInfo::fromMetaData(KPluginLoader::findPlugins("kdeconnect/"));
|
||||
QList<KPluginInfo> missingPluginInfo;
|
||||
|
||||
QStringList missingPluginNames = currentDevice->missingPlugins();
|
||||
QStringList missingPluginNames = currentDevice->unsupportedPlugins();
|
||||
for (auto it = pluginInfo.begin(), itEnd = pluginInfo.end(); it!=itEnd; ) {
|
||||
if (missingPluginNames.contains(it->pluginName())) {
|
||||
missingPluginInfo.append(*it);
|
||||
|
|
|
@ -81,11 +81,11 @@ class PluginLoadTest : public QObject
|
|||
|
||||
d->setPluginEnabled("kdeconnect_mousepad", false);
|
||||
QCOMPARE(d->isPluginEnabled("kdeconnect_mousepad"), false);
|
||||
QVERIFY(d->missingPlugins().contains("kdeconnect_remotecontrol"));
|
||||
QVERIFY(d->unsupportedPlugins().contains("kdeconnect_remotecontrol"));
|
||||
|
||||
d->setPluginEnabled("kdeconnect_mousepad", true);
|
||||
QCOMPARE(d->isPluginEnabled("kdeconnect_mousepad"), true);
|
||||
QVERIFY(!d->missingPlugins().contains("kdeconnect_remotecontrol"));
|
||||
QVERIFY(!d->unsupportedPlugins().contains("kdeconnect_remotecontrol"));
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue