Once plainbox is exporting the summary, this patch to testitemmodel.cpp uses the summary if the test has one (decided by whether the summary is different from the id), otherwise it uses partial_id.
=== modified file 'plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp' --- plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp 2014-03-26 18:12:32 +0000 +++ plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp 2014-03-26 18:56:08 +0000 @@ -178,9 +178,18 @@ description = variant.toString(); }
- variant = *iface->properties.find("partial_id"); - if (variant.isValid() && variant.canConvert(QMetaType::QString) ) { - testname = variant.toString(); + variant = *iface->properties.find("summary"); + QVariant test_id; + test_id = *iface->properties.find("id"); + if (variant.isValid() && variant.canConvert(QMetaType::QString) && + test_id.isValid() && test_id.canConvert(QMetaType::QString)) { + if (variant.toString().compare(test_id.toString()) != 0){ + testname = variant.toString(); + } else { + variant = *iface->properties.find("partial_id"); + if (variant.isValid() && variant.canConvert(QMetaType::QString)) + testname = variant.toString(); + } }
variant = *iface->properties.find("requires");
Once plainbox is exporting the summary, this patch to testitemmodel.cpp uses the summary if the test has one (decided by whether the summary is different from the id), otherwise it uses partial_id.
=== modified file 'plainbox- gui/canonical- driver- test-suite/ testitemmodel. cpp' gui/canonical- driver- test-suite/ testitemmodel. cpp 2014-03-26 18:12:32 +0000 gui/canonical- driver- test-suite/ testitemmodel. cpp 2014-03-26 18:56:08 +0000
description = variant.toString();
}
--- plainbox-
+++ plainbox-
@@ -178,9 +178,18 @@
- variant = *iface- >properties. find("partial_ id"); canConvert( QMetaType: :QString) ) { >properties. find("summary" ); >properties. find("id" ); canConvert( QMetaType: :QString) && canConvert( QMetaType: :QString) ) { toString( ).compare( test_id. toString( )) != 0){ >properties. find("partial_ id"); canConvert( QMetaType: :QString) )
}
- if (variant.isValid() && variant.
- testname = variant.toString();
+ variant = *iface-
+ QVariant test_id;
+ test_id = *iface-
+ if (variant.isValid() && variant.
+ test_id.isValid() && test_id.
+ if (variant.
+ testname = variant.toString();
+ } else {
+ variant = *iface-
+ if (variant.isValid() && variant.
+ testname = variant.toString();
+ }