summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-05-07 18:45:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-05-07 18:45:47 (GMT)
commit203ca1c122db89c4a9f9f01bff2cadb3b9daca04 (patch)
treee57d7f5997aad1832146d2806418b184e1dfe6bb /Swift/QtUI/QtAddBookmarkWindow.cpp
parent61620db053088fac637799b27f04efa44d0bcc6b (diff)
downloadswift-203ca1c122db89c4a9f9f01bff2cadb3b9daca04.zip
swift-203ca1c122db89c4a9f9f01bff2cadb3b9daca04.tar.bz2
Cleaned up MUC code.
Diffstat (limited to 'Swift/QtUI/QtAddBookmarkWindow.cpp')
-rw-r--r--Swift/QtUI/QtAddBookmarkWindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Swift/QtUI/QtAddBookmarkWindow.cpp b/Swift/QtUI/QtAddBookmarkWindow.cpp
index 2403eac..675ea03 100644
--- a/Swift/QtUI/QtAddBookmarkWindow.cpp
+++ b/Swift/QtUI/QtAddBookmarkWindow.cpp
@@ -14,11 +14,14 @@ QtAddBookmarkWindow::QtAddBookmarkWindow(UIEventStream* eventStream) : eventStre
}
bool QtAddBookmarkWindow::commit() {
- boost::shared_ptr<MUCBookmark> bookmark(createBookmarkFromForm());
+ boost::optional<MUCBookmark> bookmark = createBookmarkFromForm();
if (bookmark) {
- eventStream_->send(boost::shared_ptr<UIEvent>(new AddMUCBookmarkUIEvent(bookmark)));
+ eventStream_->send(boost::shared_ptr<UIEvent>(new AddMUCBookmarkUIEvent(*bookmark)));
+ return true;
+ }
+ else {
+ return false;
}
- return bookmark;
}
}