AutoTest: Provide possibility to copy tree items

This allows to create a copy of an item. Basically it will
copy its member objects, but it does not copy its children.
Preparation for extending grouping support for GTest.

Change-Id: I75f92be53ff4191cacea2944b31641a9292d1e58
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-03-06 10:38:36 +01:00
parent d6bb6c5018
commit 2945865516
8 changed files with 42 additions and 0 deletions

View File

@@ -35,6 +35,13 @@
namespace Autotest {
namespace Internal {
TestTreeItem *QuickTestTreeItem::copyWithoutChildren()
{
QuickTestTreeItem *copied = new QuickTestTreeItem;
copied->copyBasicDataFrom(this);
return copied;
}
QVariant QuickTestTreeItem::data(int column, int role) const
{
switch (role) {