summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-13 14:41:11 (GMT)
committerSwift Review <review@swift.im>2014-10-14 08:38:37 (GMT)
commit549dc6aa0642d6cf0d5ae2260f4195cb5b212e59 (patch)
tree2ee20a6f988724f48717bba223d44124b123fe86 /Swiften/Elements/Form.h
parentb3195ad73e4399ff431d640f2d12df5914d36221 (diff)
downloadswift-549dc6aa0642d6cf0d5ae2260f4195cb5b212e59.zip
swift-549dc6aa0642d6cf0d5ae2260f4195cb5b212e59.tar.bz2
Remove empty fields from XEP-0055 search query before sending it over the wire.
This clears both, empty fields of XEP-0004 data forms and the XEP-0055 predefiened fixed form. Test-Information: Verified using Swift's debug console and M-Link. Change-Id: I3cd2314abfe5111f66569d39aae9b8587157ec07
Diffstat (limited to 'Swiften/Elements/Form.h')
-rw-r--r--Swiften/Elements/Form.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 76ed674..16cef98 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -57,6 +57,8 @@ namespace Swift {
const std::vector<FormItem>& getItems() const;
void clearItems() { items_.clear(); }
+ void clearEmptyTextFields();
+
private:
std::vector<boost::shared_ptr<FormField> > fields_;
std::vector<boost::shared_ptr<FormField> > reportedFields_;