summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-08-22 21:07:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-08-23 08:02:12 (GMT)
commit00284e5f4445a7bbab482196901c5927ea7d5488 (patch)
treef2ca6e0c51632a8aa5a7a884f3b312bacc3a2fb0 /Swift/QtUI/UserSearch
parent54da0a4c0cceae947afbde586a97d1cc60c50ed8 (diff)
downloadswift-00284e5f4445a7bbab482196901c5927ea7d5488.zip
swift-00284e5f4445a7bbab482196901c5927ea7d5488.tar.bz2
FormField element refactoring.
This should make FormField easier to use. Change-Id: Ia5eeedcdb673e2fe5e38fd23d5ab00970178bc44
Diffstat (limited to 'Swift/QtUI/UserSearch')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 02b238e..73514fd 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2013 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -179,12 +179,12 @@ JID QtUserSearchWindow::getContactJID() const {
Form::FormItem item = dynamic_cast<QtFormResultItemModel*>(model_)->getForm()->getItems().at(row);
JID fallbackJid;
foreach(FormField::ref field, item) {
- if (boost::dynamic_pointer_cast<JIDSingleFormField>(field)) {
- jid = JID(field->getRawValues().at(0));
+ if (field->getType() == FormField::JIDSingleType) {
+ jid = JID(field->getJIDSingleValue());
break;
}
if (field->getName() == "jid") {
- fallbackJid = field->getRawValues().at(0);
+ fallbackJid = field->getValues()[0];
}
}
if (!jid.isValid()) {