diff options
Diffstat (limited to 'Swift/QtUI/QtAddBookmarkWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtAddBookmarkWindow.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Swift/QtUI/QtAddBookmarkWindow.cpp b/Swift/QtUI/QtAddBookmarkWindow.cpp index 675ea03..8c5d662 100644 --- a/Swift/QtUI/QtAddBookmarkWindow.cpp +++ b/Swift/QtUI/QtAddBookmarkWindow.cpp @@ -1,27 +1,30 @@ /* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ -#include "QtAddBookmarkWindow.h" - -#include <qdebug.h> +#include <Swift/QtUI/QtAddBookmarkWindow.h> namespace Swift { QtAddBookmarkWindow::QtAddBookmarkWindow(UIEventStream* eventStream) : eventStream_(eventStream) { + setWindowTitle(tr("Add Bookmark Details")); +} +QtAddBookmarkWindow::QtAddBookmarkWindow(UIEventStream* eventStream, const MUCBookmark& bookmark) : eventStream_(eventStream) { + createFormFromBookmark(bookmark); + setWindowTitle(tr("Add Bookmark Details")); } bool QtAddBookmarkWindow::commit() { - boost::optional<MUCBookmark> bookmark = createBookmarkFromForm(); - if (bookmark) { - eventStream_->send(boost::shared_ptr<UIEvent>(new AddMUCBookmarkUIEvent(*bookmark))); - return true; - } - else { - return false; - } + boost::optional<MUCBookmark> bookmark = createBookmarkFromForm(); + if (bookmark) { + eventStream_->send(std::make_shared<AddMUCBookmarkUIEvent>(*bookmark)); + return true; + } + else { + return false; + } } } |