diff options
Diffstat (limited to 'Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp')
-rw-r--r-- | Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp b/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp index d95682c..ce6e8f9 100644 --- a/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp +++ b/Swift/QtUI/MUCSearch/MUCSearchEmptyItem.cpp @@ -6,18 +6,23 @@ #include <Swift/QtUI/MUCSearch/MUCSearchEmptyItem.h> +#include <memory> + #include <QColor> #include <QFont> #include <Swift/QtUI/MUCSearch/MUCSearchServiceItem.h> namespace Swift { -MUCSearchEmptyItem::MUCSearchEmptyItem(MUCSearchServiceItem* parent) : parent(parent) { - parent->addRoom(this); +MUCSearchEmptyItem::MUCSearchEmptyItem() { +} + +void MUCSearchEmptyItem::setParent(std::shared_ptr<MUCSearchServiceItem> parent) { + parent_ = parent; } -MUCSearchServiceItem* MUCSearchEmptyItem::getParent() { - return parent; +std::shared_ptr<MUCSearchServiceItem> MUCSearchEmptyItem::getParent() { + return parent_.lock(); } QVariant MUCSearchEmptyItem::data(int role) { |