forked from qt-creator/qt-creator
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:
@@ -314,6 +314,20 @@ QSet<QString> TestTreeItem::internalTargets() const
|
||||
return targets;
|
||||
}
|
||||
|
||||
void TestTreeItem::copyBasicDataFrom(const TestTreeItem *other)
|
||||
{
|
||||
if (!other)
|
||||
return;
|
||||
m_name = other->m_name;
|
||||
m_filePath = other->m_filePath;
|
||||
m_type = other->m_type;
|
||||
m_checked = other->m_checked;
|
||||
m_line = other->m_line;
|
||||
m_column = other->m_column;
|
||||
m_proFile = other->m_proFile;
|
||||
m_status = other->m_status;
|
||||
}
|
||||
|
||||
inline bool TestTreeItem::modifyFilePath(const QString &filePath)
|
||||
{
|
||||
if (m_filePath != filePath) {
|
||||
|
||||
Reference in New Issue
Block a user