diff options
Diffstat (limited to 'Swift/QtUI/MUCSearch/MUCSearchRoomItem.h')
-rw-r--r-- | Swift/QtUI/MUCSearch/MUCSearchRoomItem.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Swift/QtUI/MUCSearch/MUCSearchRoomItem.h b/Swift/QtUI/MUCSearch/MUCSearchRoomItem.h index d0f8daa..5ecb7d7 100644 --- a/Swift/QtUI/MUCSearch/MUCSearchRoomItem.h +++ b/Swift/QtUI/MUCSearch/MUCSearchRoomItem.h @@ -1,23 +1,27 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include "Swift/QtUI/MUCSearch/MUCSearchItem.h" +#include <memory> + +#include <Swift/QtUI/MUCSearch/MUCSearchItem.h> namespace Swift { - class MUCSearchServiceItem; - class MUCSearchRoomItem : public MUCSearchItem { - public: - MUCSearchRoomItem(const QString& node, MUCSearchServiceItem* parent); - MUCSearchServiceItem* getParent(); - QVariant data(int role); - QString getNode() const {return node_;} - private: - MUCSearchServiceItem* parent_; - QString node_; - }; + class MUCSearchServiceItem; + class MUCSearchRoomItem : public MUCSearchItem { + public: + MUCSearchRoomItem(const QString& node); + void setParent(std::weak_ptr<MUCSearchServiceItem> parent); + std::shared_ptr<MUCSearchServiceItem> getParent(); + QVariant data(int role); + QString getNode() const {return node_;} + + private: + std::weak_ptr<MUCSearchServiceItem> parent_; + QString node_; + }; } |