| 75 | } |
| 76 | |
| 77 | bool hasMandatoryProperties( const KPluginMetaData& info ) |
| 78 | { |
| 79 | QString mode = info.value(KEY_Mode()); |
| 80 | if (mode.isEmpty()) { |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | // when the plugin is installed into the versioned plugin path, it's good to go |
| 85 | if (info.fileName().contains(QLatin1String("/kdevplatform/" QT_STRINGIFY(KDEVELOP_PLUGIN_VERSION) "/"))) { |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | // the version property is only required when the plugin is not installed into the right directory |
| 90 | QVariant version = info.rawData().value(KEY_Version()).toVariant(); |
| 91 | if (version.isValid() && version.value<int>() == KDEVELOP_PLUGIN_VERSION) { |
| 92 | return true; |
| 93 | } |
| 94 | |
| 95 | return false; |
| 96 | } |
| 97 | |
| 98 | inline QSet<QString> stringSet(const QVariant& variant) |
| 99 | { |
no test coverage detected