From 416d9736ff5f6ac3819de7dc645d5e6e12051856 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 31 Jan 2024 23:48:28 +0100 Subject: [PATCH] Replace remaining usage of QSchematic::Item with QSchematic::Items::Item Reported by @bjornstromberg Fixes #56 --- demo/library/model.cpp | 2 +- docs/README.md | 6 +++--- qschematic/utils/itemscustodian.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo/library/model.cpp b/demo/library/model.cpp index 15d7c8bb..aaaccc7b 100644 --- a/demo/library/model.cpp +++ b/demo/library/model.cpp @@ -89,7 +89,7 @@ const QSchematic::Items::Item* Model::itemFromIndex(const QModelIndex& index) co return nullptr; } - // Retrieve the QSchematic::Item + // Retrieve the QSchematic::Items::Item return itemInfo->item; } diff --git a/docs/README.md b/docs/README.md index c7547a60..d61af8e0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -174,7 +174,7 @@ junctions that are on the first segment to the second segment. The `wire_system::wire` class only implements the logic that is related to the wire. For the graphical stuff, `QSchematic` uses a subclass named -`QSchematic::Wire`. This class also inherits from `QSchematic::Item` and takes +`QSchematic::Wire`. This class also inherits from `QSchematic::Items::Item` and takes care of rendering the wire and handles the events like when the user drags a point etc. As the wire has to be redrawn when the points are modified, the `wire_system::wire` class provides two virtual methods, `about_to_change()` and @@ -243,8 +243,8 @@ the manager so that it can make sure the wires stay connected to it. ### Connectors -`QSchematic` uses a subclass of `connectable` called `Connector` that inherits -from `QSchematic::Item` and implements everything that relates to the graphics. +`QSchematic` uses a subclass of `connectable` called `Connector` that inherits +from `QSchematic::Items::Item` and implements everything that relates to the graphics. ## Net diff --git a/qschematic/utils/itemscustodian.hpp b/qschematic/utils/itemscustodian.hpp index faab5c95..eab573b5 100644 --- a/qschematic/utils/itemscustodian.hpp +++ b/qschematic/utils/itemscustodian.hpp @@ -20,7 +20,7 @@ namespace QSchematic::ItemUtils */ ~ItemsCustodian() { - if constexpr (std::is_base_of_v) { + if constexpr (std::is_base_of_v) { for ( auto const& item : _custody_items ) item->setParentItem(nullptr); }