forked from qt-creator/qt-creator
AutoTest: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Move TestParseResultPtr to the common place and don't repeat this typedef. Change-Id: Id8523b7898965ea9bfccb8a1bdc6a8ea23f090ed Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -40,8 +40,6 @@ public:
|
||||
int column = 0;
|
||||
};
|
||||
|
||||
using TestParseResultPtr = QSharedPointer<TestParseResult>;
|
||||
|
||||
class ITestParser
|
||||
{
|
||||
public:
|
||||
|
@@ -29,6 +29,8 @@ class ITestConfiguration;
|
||||
class TestParseResult;
|
||||
enum class TestRunMode;
|
||||
|
||||
using TestParseResultPtr = std::shared_ptr<TestParseResult>;
|
||||
|
||||
class ITestTreeItem : public Utils::TypedTreeItem<ITestTreeItem>
|
||||
{
|
||||
public:
|
||||
|
@@ -685,7 +685,7 @@ void TestTreeModel::onParseResultsReady(const QList<TestParseResultPtr> &results
|
||||
QTC_ASSERT(framework, return);
|
||||
TestTreeItem *rootNode = framework->rootNode();
|
||||
QTC_ASSERT(rootNode, return);
|
||||
handleParseResult(result.data(), rootNode);
|
||||
handleParseResult(result.get(), rootNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,6 @@ class TestCodeParser;
|
||||
} // namespace Internal
|
||||
|
||||
class TestParseResult;
|
||||
using TestParseResultPtr = QSharedPointer<TestParseResult>;
|
||||
|
||||
class AUTOTESTSHARED_EXPORT TestTreeModel : public Utils::TreeModel<Utils::TreeItem, ITestTreeItem>
|
||||
{
|
||||
|
Reference in New Issue
Block a user