forked from qt-creator/qt-creator
AutoTest: Use using namespace Utils more often
Change-Id: I9d20cd3496c4719d58a977f8fd53253c86d55463 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
|
||||
@@ -123,7 +125,7 @@ bool BoostTestTreeItem::modify(const TestParseResult *result)
|
||||
|
||||
TestTreeItem *BoostTestTreeItem::createParentGroupNode() const
|
||||
{
|
||||
const Utils::FilePath &absPath = filePath().absolutePath();
|
||||
const FilePath &absPath = filePath().absolutePath();
|
||||
return new BoostTestTreeItem(framework(), absPath.baseName(), absPath, TestTreeItem::GroupNode);
|
||||
}
|
||||
|
||||
@@ -164,7 +166,7 @@ QList<ITestConfiguration *> BoostTestTreeItem::getAllTestConfigurations() const
|
||||
};
|
||||
|
||||
// we only need the unique project files (and number of test cases for the progress indicator)
|
||||
QHash<Utils::FilePath, BoostTestCases> testsPerProjectfile;
|
||||
QHash<FilePath, BoostTestCases> testsPerProjectfile;
|
||||
forAllChildItems([&testsPerProjectfile](TestTreeItem *item){
|
||||
if (item->type() != TestSuite)
|
||||
return;
|
||||
@@ -207,7 +209,7 @@ QList<ITestConfiguration *> BoostTestTreeItem::getTestConfigurations(
|
||||
QSet<QString> internalTargets;
|
||||
};
|
||||
|
||||
QHash<Utils::FilePath, BoostTestCases> testCasesForProjectFile;
|
||||
QHash<FilePath, BoostTestCases> testCasesForProjectFile;
|
||||
forAllChildren([&testCasesForProjectFile, &predicate](TreeItem *it){
|
||||
auto item = static_cast<BoostTestTreeItem *>(it);
|
||||
if (item->type() != TestCase)
|
||||
@@ -346,10 +348,10 @@ bool BoostTestTreeItem::enabled() const
|
||||
|
||||
TestTreeItem *BoostTestTreeItem::findChildByNameStateAndFile(const QString &name,
|
||||
BoostTestTreeItem::TestStates state,
|
||||
const Utils::FilePath &proFile) const
|
||||
const FilePath &proFile) const
|
||||
{
|
||||
return static_cast<TestTreeItem *>(
|
||||
findAnyChild([name, state, proFile](const Utils::TreeItem *other){
|
||||
findAnyChild([name, state, proFile](const TreeItem *other){
|
||||
const BoostTestTreeItem *boostItem = static_cast<const BoostTestTreeItem *>(other);
|
||||
return boostItem->proFile() == proFile && boostItem->fullName() == name
|
||||
&& boostItem->state() == state;
|
||||
|
||||
Reference in New Issue
Block a user