2014-10-07 12:30:54 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** This file is part of Qt Creator.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
2014-10-07 12:30:54 +02:00
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-22 10:37:55 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2020-10-09 13:07:55 +02:00
|
|
|
#include "testtreeitem.h"
|
|
|
|
|
|
2015-09-10 10:57:15 +02:00
|
|
|
#include "autotestconstants.h"
|
2020-10-06 15:27:27 +02:00
|
|
|
#include "itestframework.h"
|
2016-05-11 13:02:42 +02:00
|
|
|
#include "itestparser.h"
|
2016-04-08 14:58:23 +02:00
|
|
|
#include "testconfiguration.h"
|
2014-10-07 12:30:54 +02:00
|
|
|
|
2016-04-08 14:58:23 +02:00
|
|
|
#include <texteditor/texteditor.h>
|
2017-12-06 08:45:36 +01:00
|
|
|
#include <utils/utilsicons.h>
|
2015-09-04 11:02:14 +02:00
|
|
|
|
2015-09-10 10:57:15 +02:00
|
|
|
#include <QIcon>
|
|
|
|
|
|
2014-10-07 12:30:54 +02:00
|
|
|
namespace Autotest {
|
|
|
|
|
|
2015-09-10 10:57:15 +02:00
|
|
|
static QIcon testTreeIcon(TestTreeItem::Type type)
|
|
|
|
|
{
|
|
|
|
|
static QIcon icons[] = {
|
|
|
|
|
QIcon(),
|
2017-12-06 08:45:36 +01:00
|
|
|
Utils::Icons::OPENFILE.icon(),
|
2019-05-14 11:26:16 +02:00
|
|
|
QIcon(":/autotest/images/suite.png"),
|
2018-07-25 10:00:38 +02:00
|
|
|
Utils::CodeModelIcon::iconForType(Utils::CodeModelIcon::Class),
|
|
|
|
|
Utils::CodeModelIcon::iconForType(Utils::CodeModelIcon::SlotPrivate),
|
2018-03-21 22:26:12 +01:00
|
|
|
QIcon(":/autotest/images/data.png")
|
2015-09-10 10:57:15 +02:00
|
|
|
};
|
2015-12-07 15:15:00 +01:00
|
|
|
|
2015-10-23 17:33:40 +02:00
|
|
|
if (int(type) >= int(sizeof icons / sizeof *icons))
|
2017-12-06 08:45:36 +01:00
|
|
|
return icons[3];
|
2015-09-10 10:57:15 +02:00
|
|
|
return icons[type];
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
ITestTreeItem::ITestTreeItem(ITestBase *testBase, const QString &name,
|
|
|
|
|
const QString &filePath, Type type)
|
|
|
|
|
: m_testBase(testBase)
|
|
|
|
|
, m_name(name)
|
|
|
|
|
, m_filePath(filePath)
|
|
|
|
|
, m_type(type)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
QVariant ITestTreeItem::data(int /*column*/, int role) const
|
2015-09-10 10:57:15 +02:00
|
|
|
{
|
|
|
|
|
switch (role) {
|
|
|
|
|
case Qt::DisplayRole:
|
2015-12-07 08:26:54 +01:00
|
|
|
if (m_type == Root && childCount() == 0)
|
2016-08-30 11:54:23 +02:00
|
|
|
return QCoreApplication::translate("TestTreeItem", "%1 (none)").arg(m_name);
|
2015-09-10 10:57:15 +02:00
|
|
|
else
|
|
|
|
|
return m_name;
|
|
|
|
|
case Qt::ToolTipRole:
|
|
|
|
|
return m_filePath;
|
|
|
|
|
case Qt::DecorationRole:
|
|
|
|
|
return testTreeIcon(m_type);
|
|
|
|
|
case Qt::CheckStateRole:
|
2016-04-08 14:58:23 +02:00
|
|
|
return QVariant();
|
2015-09-10 10:57:15 +02:00
|
|
|
case ItalicRole:
|
2016-04-08 14:58:23 +02:00
|
|
|
return false;
|
2015-09-10 10:57:15 +02:00
|
|
|
case TypeRole:
|
|
|
|
|
return m_type;
|
2016-04-29 11:15:14 +02:00
|
|
|
case EnabledRole:
|
|
|
|
|
return true;
|
2020-09-11 14:30:15 +02:00
|
|
|
case FailedRole:
|
|
|
|
|
return m_failed;
|
2015-09-10 10:57:15 +02:00
|
|
|
}
|
|
|
|
|
return QVariant();
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
bool ITestTreeItem::setData(int /*column*/, const QVariant &data, int role)
|
2015-09-10 10:57:15 +02:00
|
|
|
{
|
|
|
|
|
if (role == Qt::CheckStateRole) {
|
2018-01-23 16:12:47 +01:00
|
|
|
Qt::CheckState old = m_checked;
|
2018-07-11 15:44:51 +02:00
|
|
|
m_checked = Qt::CheckState(data.toInt());
|
2018-01-23 16:12:47 +01:00
|
|
|
return m_checked != old;
|
2020-09-11 14:30:15 +02:00
|
|
|
} else if (role == FailedRole) {
|
|
|
|
|
m_failed = data.toBool();
|
2015-09-10 10:57:15 +02:00
|
|
|
}
|
|
|
|
|
return false;
|
2014-10-07 12:30:54 +02:00
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
Qt::ItemFlags ITestTreeItem::flags(int /*column*/) const
|
2016-04-28 16:42:14 +02:00
|
|
|
{
|
|
|
|
|
static const Qt::ItemFlags defaultFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
2020-10-12 14:11:10 +02:00
|
|
|
switch (type()) {
|
2016-04-28 16:42:14 +02:00
|
|
|
case Root:
|
2017-12-06 08:45:36 +01:00
|
|
|
case GroupNode:
|
2017-02-02 15:05:32 +01:00
|
|
|
return Qt::ItemIsEnabled | Qt::ItemIsAutoTristate | Qt::ItemIsUserCheckable;
|
2019-05-14 11:26:16 +02:00
|
|
|
case TestSuite:
|
2016-04-28 16:42:14 +02:00
|
|
|
case TestCase:
|
2016-08-03 23:33:32 +03:00
|
|
|
return defaultFlags | Qt::ItemIsAutoTristate | Qt::ItemIsUserCheckable;
|
2019-05-21 07:50:34 +02:00
|
|
|
case TestFunction:
|
2016-04-28 16:42:14 +02:00
|
|
|
return defaultFlags | Qt::ItemIsUserCheckable;
|
|
|
|
|
default:
|
|
|
|
|
return defaultFlags;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
Qt::CheckState ITestTreeItem::checked() const
|
|
|
|
|
{
|
|
|
|
|
return m_checked;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool ITestTreeItem::lessThan(const ITestTreeItem *other, ITestTreeItem::SortMode mode) const
|
|
|
|
|
{
|
|
|
|
|
const QString &lhs = data(0, Qt::DisplayRole).toString();
|
|
|
|
|
const QString &rhs = other->data(0, Qt::DisplayRole).toString();
|
|
|
|
|
|
|
|
|
|
switch (mode) {
|
|
|
|
|
case Alphabetically:
|
|
|
|
|
if (lhs == rhs)
|
|
|
|
|
return index().row() > other->index().row();
|
|
|
|
|
return lhs > rhs;
|
|
|
|
|
case Naturally: {
|
|
|
|
|
if (type() == GroupNode && other->type() == GroupNode)
|
|
|
|
|
return filePath() > other->filePath();
|
|
|
|
|
|
|
|
|
|
const Utils::Link &leftLink = data(0, LinkRole).value<Utils::Link>();
|
|
|
|
|
const Utils::Link &rightLink = other->data(0, LinkRole).value<Utils::Link>();
|
|
|
|
|
if (leftLink.targetFileName == rightLink.targetFileName) {
|
|
|
|
|
return leftLink.targetLine == rightLink.targetLine
|
|
|
|
|
? leftLink.targetColumn > rightLink.targetColumn
|
|
|
|
|
: leftLink.targetLine > rightLink.targetLine;
|
|
|
|
|
}
|
|
|
|
|
return leftLink.targetFileName > rightLink.targetFileName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-13 11:37:37 +02:00
|
|
|
ITestConfiguration *ITestTreeItem::asConfiguration(TestRunMode mode) const
|
|
|
|
|
{
|
|
|
|
|
switch (mode) {
|
|
|
|
|
case TestRunMode::Run:
|
|
|
|
|
case TestRunMode::RunWithoutDeploy:
|
|
|
|
|
return testConfiguration();
|
|
|
|
|
default:
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
/****************************** TestTreeItem ********************************************/
|
|
|
|
|
|
2021-01-29 19:32:39 +01:00
|
|
|
TestTreeItem::TestTreeItem(ITestFramework *testFramework, const QString &name,
|
2020-10-12 14:11:10 +02:00
|
|
|
const QString &filePath, Type type)
|
2021-01-29 19:32:39 +01:00
|
|
|
: ITestTreeItem(testFramework, name, filePath, type)
|
2020-10-12 14:11:10 +02:00
|
|
|
{
|
|
|
|
|
switch (type) {
|
|
|
|
|
case Root:
|
|
|
|
|
case GroupNode:
|
|
|
|
|
case TestSuite:
|
|
|
|
|
case TestCase:
|
|
|
|
|
case TestFunction:
|
|
|
|
|
m_checked = Qt::Checked;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
m_checked = Qt::Unchecked;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QVariant TestTreeItem::data(int column, int role) const
|
|
|
|
|
{
|
|
|
|
|
if (role == LinkRole) {
|
|
|
|
|
if (type() == GroupNode)
|
|
|
|
|
return QVariant();
|
|
|
|
|
QVariant itemLink;
|
|
|
|
|
itemLink.setValue(Utils::Link(filePath(), line(), int(m_column)));
|
|
|
|
|
return itemLink;
|
|
|
|
|
}
|
|
|
|
|
return ITestTreeItem::data(column, role);
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-14 11:26:16 +02:00
|
|
|
bool TestTreeItem::modifyTestCaseOrSuiteContent(const TestParseResult *result)
|
2014-10-07 12:30:54 +02:00
|
|
|
{
|
2017-05-10 13:42:44 +02:00
|
|
|
bool hasBeenModified = modifyName(result->name);
|
|
|
|
|
hasBeenModified |= modifyLineAndColumn(result);
|
2016-02-08 15:56:07 +01:00
|
|
|
return hasBeenModified;
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-03 13:03:03 +02:00
|
|
|
bool TestTreeItem::modifyTestFunctionContent(const TestParseResult *result)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
2016-05-03 13:03:03 +02:00
|
|
|
bool hasBeenModified = modifyFilePath(result->fileName);
|
2017-05-10 13:42:44 +02:00
|
|
|
hasBeenModified |= modifyLineAndColumn(result);
|
2016-02-08 15:56:07 +01:00
|
|
|
return hasBeenModified;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-10 13:42:44 +02:00
|
|
|
bool TestTreeItem::modifyDataTagContent(const TestParseResult *result)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
2017-05-10 13:42:44 +02:00
|
|
|
|
|
|
|
|
bool hasBeenModified = modifyTestFunctionContent(result);
|
|
|
|
|
hasBeenModified |= modifyName(result->name);
|
2016-02-08 15:56:07 +01:00
|
|
|
return hasBeenModified;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-10 13:42:44 +02:00
|
|
|
bool TestTreeItem::modifyLineAndColumn(const TestParseResult *result)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
|
|
|
|
bool hasBeenModified = false;
|
2020-10-12 14:11:10 +02:00
|
|
|
if (line() != result->line) {
|
|
|
|
|
setLine(result->line);
|
2015-02-16 12:19:26 +01:00
|
|
|
hasBeenModified = true;
|
|
|
|
|
}
|
2017-05-10 13:42:44 +02:00
|
|
|
if (m_column != result->column) {
|
|
|
|
|
m_column = result->column;
|
2016-01-15 07:21:38 +01:00
|
|
|
hasBeenModified = true;
|
|
|
|
|
}
|
2014-10-07 12:30:54 +02:00
|
|
|
return hasBeenModified;
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-26 13:52:45 +01:00
|
|
|
void TestTreeItem::markForRemoval(bool mark)
|
|
|
|
|
{
|
2016-03-04 11:56:56 +01:00
|
|
|
m_status = mark ? MarkedForRemoval : Cleared;
|
2016-01-26 13:52:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TestTreeItem::markForRemovalRecursively(bool mark)
|
|
|
|
|
{
|
2016-03-04 11:56:56 +01:00
|
|
|
markForRemoval(mark);
|
2016-01-26 13:52:45 +01:00
|
|
|
for (int row = 0, count = childCount(); row < count; ++row)
|
2020-10-12 14:11:10 +02:00
|
|
|
childItem(row)->markForRemovalRecursively(mark);
|
2016-01-26 13:52:45 +01:00
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
void TestTreeItem::markForRemovalRecursively(const QString &filepath)
|
2016-04-28 16:42:14 +02:00
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
bool mark = filePath() == filepath;
|
|
|
|
|
forFirstLevelChildItems([&mark, &filepath](TestTreeItem *child) {
|
|
|
|
|
child->markForRemovalRecursively(filepath);
|
2018-03-07 14:56:07 +01:00
|
|
|
mark &= child->markedForRemoval();
|
2018-04-17 15:53:06 +02:00
|
|
|
});
|
2018-03-07 14:56:07 +01:00
|
|
|
markForRemoval(mark);
|
2016-04-28 16:42:14 +02:00
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
TestTreeItem *TestTreeItem::childItem(int at) const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<TestTreeItem *>(childAt(at));
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-10 15:32:12 +02:00
|
|
|
TestTreeItem *TestTreeItem::parentItem() const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<TestTreeItem *>(parent());
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-08 15:56:07 +01:00
|
|
|
TestTreeItem *TestTreeItem::findChildByName(const QString &name)
|
|
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
return findFirstLevelChildItem([name](const TestTreeItem *other) {
|
|
|
|
|
return other->name() == name;
|
|
|
|
|
});
|
2016-02-08 15:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
2016-02-23 15:56:52 +01:00
|
|
|
TestTreeItem *TestTreeItem::findChildByFile(const QString &filePath)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
return findFirstLevelChildItem([filePath](const TestTreeItem *other) {
|
2016-02-23 15:56:52 +01:00
|
|
|
return other->filePath() == filePath;
|
2016-02-08 15:56:07 +01:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-13 13:38:43 +01:00
|
|
|
TestTreeItem *TestTreeItem::findChildByFileAndType(const QString &filePath, Type tType)
|
|
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
return findFirstLevelChildItem([filePath, tType](const TestTreeItem *other) {
|
2018-03-13 13:38:43 +01:00
|
|
|
return other->type() == tType && other->filePath() == filePath;
|
2020-10-12 14:11:10 +02:00
|
|
|
});}
|
2018-03-13 13:38:43 +01:00
|
|
|
|
2016-02-08 15:56:07 +01:00
|
|
|
TestTreeItem *TestTreeItem::findChildByNameAndFile(const QString &name, const QString &filePath)
|
|
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
return findFirstLevelChildItem([name, filePath](const TestTreeItem *other) {
|
2016-02-08 15:56:07 +01:00
|
|
|
return other->filePath() == filePath && other->name() == name;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-13 11:37:37 +02:00
|
|
|
ITestConfiguration *TestTreeItem::asConfiguration(TestRunMode mode) const
|
2018-02-16 17:57:37 +01:00
|
|
|
{
|
|
|
|
|
switch (mode) {
|
|
|
|
|
case TestRunMode::Debug:
|
|
|
|
|
case TestRunMode::DebugWithoutDeploy:
|
|
|
|
|
return debugConfiguration();
|
2019-08-08 09:57:42 +02:00
|
|
|
default:
|
2020-10-13 11:37:37 +02:00
|
|
|
return ITestTreeItem::asConfiguration(mode);
|
2018-02-16 17:57:37 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-13 11:37:37 +02:00
|
|
|
QList<ITestConfiguration *> TestTreeItem::getTestConfigurationsForFile(const Utils::FilePath &) const
|
2018-05-05 22:28:55 +03:00
|
|
|
{
|
2020-10-13 11:37:37 +02:00
|
|
|
return QList<ITestConfiguration *>();
|
2018-05-05 22:28:55 +03:00
|
|
|
}
|
|
|
|
|
|
2017-12-06 08:45:36 +01:00
|
|
|
bool TestTreeItem::isGroupNodeFor(const TestTreeItem *other) const
|
|
|
|
|
{
|
|
|
|
|
QTC_ASSERT(other, return false);
|
|
|
|
|
if (type() != TestTreeItem::GroupNode)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
// for now there's only the possibility to have 'Folder' nodes
|
|
|
|
|
return QFileInfo(other->filePath()).absolutePath() == filePath();
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-06 13:57:17 +02:00
|
|
|
bool TestTreeItem::isGroupable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
void TestTreeItem::forAllChildItems(const std::function<void(TestTreeItem *)> &pred) const
|
|
|
|
|
{
|
|
|
|
|
for (int row = 0, end = childCount(); row < end; ++row) {
|
|
|
|
|
TestTreeItem *child = childItem(row);
|
|
|
|
|
pred(child);
|
|
|
|
|
child->forAllChildItems(pred);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TestTreeItem::forFirstLevelChildItems(const std::function<void(TestTreeItem *)> &pred) const
|
|
|
|
|
{
|
|
|
|
|
for (int row = 0, end = childCount(); row < end; ++row)
|
|
|
|
|
pred(childItem(row));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TestTreeItem *TestTreeItem::findFirstLevelChildItem(const std::function<bool(TestTreeItem *)> &pred) const
|
|
|
|
|
{
|
|
|
|
|
for (int row = 0, end = childCount(); row < end; ++row) {
|
|
|
|
|
TestTreeItem *child = childItem(row);
|
|
|
|
|
if (pred(child))
|
|
|
|
|
return child;
|
|
|
|
|
}
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-06 10:38:36 +01:00
|
|
|
void TestTreeItem::copyBasicDataFrom(const TestTreeItem *other)
|
|
|
|
|
{
|
|
|
|
|
if (!other)
|
|
|
|
|
return;
|
2020-10-12 14:11:10 +02:00
|
|
|
|
|
|
|
|
setName(other->name());
|
|
|
|
|
setFilePath(other->filePath());
|
|
|
|
|
setType(other->type());
|
|
|
|
|
setLine(other->line());
|
|
|
|
|
setData(0, other->checked(), Qt::CheckStateRole);
|
|
|
|
|
setData(0, other->data(0, FailedRole), FailedRole);
|
|
|
|
|
|
2018-03-06 10:38:36 +01:00
|
|
|
m_column = other->m_column;
|
|
|
|
|
m_proFile = other->m_proFile;
|
|
|
|
|
m_status = other->m_status;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
inline bool TestTreeItem::modifyFilePath(const QString &filepath)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
if (filePath() != filepath) {
|
|
|
|
|
setFilePath(filepath);
|
2016-02-08 15:56:07 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-12 14:11:10 +02:00
|
|
|
inline bool TestTreeItem::modifyName(const QString &newName)
|
2016-02-08 15:56:07 +01:00
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
if (name() != newName) {
|
|
|
|
|
setName(newName);
|
2016-02-08 15:56:07 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-26 10:11:39 +01:00
|
|
|
ITestFramework *TestTreeItem::framework() const
|
|
|
|
|
{
|
2020-10-12 14:11:10 +02:00
|
|
|
return static_cast<ITestFramework *>(testBase());
|
2020-03-26 10:11:39 +01:00
|
|
|
}
|
|
|
|
|
|
2014-10-07 12:30:54 +02:00
|
|
|
} // namespace Autotest
|