diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-07-03 17:41:24 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2014-07-04 08:51:39 +0200 |
commit | ac31d3c67ec12a64e7b0d69179b05b950f5a8d61 (patch) | |
tree | 258c7443f90d89975b4a0be798cf07a5db43c47f /tests | |
parent | 9c6f559156281a7b7198075382559b90ad9dd6de (diff) | |
download | qt-creator-ac31d3c67ec12a64e7b0d69179b05b950f5a8d61.tar.gz |
PluginManager: Remove hardcoded list of plugins that cannot be disabled
Instead add an optional attribute "required" to the plugin spec. Since
the locator plugin and find plugin are gone, and I don't see a reason to
prevent disabling the text editor plugin, only Core plugin gets the new
attribute set.
Change-Id: I7a380026ea46173cf00afff4213ca1b3a2578434
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/extensionsystem/pluginspec/testspecs/spec2.xml | 2 | ||||
-rw-r--r-- | tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/extensionsystem/pluginspec/testspecs/spec2.xml b/tests/auto/extensionsystem/pluginspec/testspecs/spec2.xml index 454f58cb75..24d272902a 100644 --- a/tests/auto/extensionsystem/pluginspec/testspecs/spec2.xml +++ b/tests/auto/extensionsystem/pluginspec/testspecs/spec2.xml @@ -1,2 +1,2 @@ -<plugin name="test" version="3.1.4_10"> +<plugin name="test" version="3.1.4_10" required="true"> </plugin> diff --git a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp index dcb1e67b16..8318a6bea6 100644 --- a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp +++ b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp @@ -74,6 +74,7 @@ void tst_PluginSpec::read() QCOMPARE(spec.name, QString("test")); QCOMPARE(spec.version, QString("1.0.1")); QCOMPARE(spec.compatVersion, QString("1.0.0")); + QCOMPARE(spec.required, false); QCOMPARE(spec.experimental, false); QCOMPARE(spec.enabledInSettings, true); QCOMPARE(spec.vendor, QString("Digia Plc")); @@ -90,9 +91,11 @@ void tst_PluginSpec::read() QCOMPARE(spec.dependencies, QList<PluginDependency>() << dep1 << dep2); // test missing compatVersion behavior + // and 'required' attribute QVERIFY(spec.read("testspecs/spec2.xml")); QCOMPARE(spec.version, QString("3.1.4_10")); QCOMPARE(spec.compatVersion, QString("3.1.4_10")); + QCOMPARE(spec.required, true); } void tst_PluginSpec::readError() |