summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-08-25 14:00:10 (GMT)
committerTobias Markmann <tm@ayena.de>2016-08-25 14:12:34 (GMT)
commit5a4e7d9518e91cf39b96f14b3b310fe5b9a27594 (patch)
treede15882d3bb6f7b5e8230deada40ccc705a25c9c /Swift/QtUI/MUCSearch/MUCSearchItem.h
parent5a19f3167b640966c582e52abe4b55ef20bd79b2 (diff)
downloadswift-5a4e7d9518e91cf39b96f14b3b310fe5b9a27594.zip
swift-5a4e7d9518e91cf39b96f14b3b310fe5b9a27594.tar.bz2
Alphabetically sort MUC search result
This also changes the classes around MUCSearchModel to C++11 smart pointer based memory management. Test-Information: Verified that dtors of MUCSearch*Items are called when old search results are replaced by new search results. This was not the case previously. All unit tests and manual testing with an ASAN enabled build succeeded. Change-Id: I84d62f3b86138728401b98d3774f47c72fdf9a4c
Diffstat (limited to 'Swift/QtUI/MUCSearch/MUCSearchItem.h')
-rw-r--r--Swift/QtUI/MUCSearch/MUCSearchItem.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Swift/QtUI/MUCSearch/MUCSearchItem.h b/Swift/QtUI/MUCSearch/MUCSearchItem.h
index c378247..d0e2a88 100644
--- a/Swift/QtUI/MUCSearch/MUCSearchItem.h
+++ b/Swift/QtUI/MUCSearch/MUCSearchItem.h
@@ -1,17 +1,23 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
+#include <memory>
+
#include <QVariant>
namespace Swift {
- class MUCSearchItem {
+
+class MUCSearchServiceItem;
+
+class MUCSearchItem {
public:
virtual ~MUCSearchItem() {}
+ virtual void setParent(std::shared_ptr<MUCSearchServiceItem>) { }
virtual QVariant data(int role) = 0;
};
}