diff options
Diffstat (limited to 'Swift/QtUI/QtAddBookmarkWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtAddBookmarkWindow.cpp | 9 |
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; } } |