diff options
21 files changed, 70 insertions, 26 deletions
diff --git a/Swift/Controllers/HistoryController.cpp b/Swift/Controllers/HistoryController.cpp index d730236..5732382 100644 --- a/Swift/Controllers/HistoryController.cpp +++ b/Swift/Controllers/HistoryController.cpp @@ -5,4 +5,11 @@ */ +/* + * Copyright (c) 2014 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + + #include <Swift/Controllers/HistoryController.h> #include <Swiften/History/HistoryStorage.h> @@ -12,5 +19,5 @@ namespace Swift { -HistoryController::HistoryController(HistoryStorage* localHistoryStorage) : localHistory_(localHistoryStorage) { +HistoryController::HistoryController(HistoryStorage* localHistoryStorage) : localHistory_(localHistoryStorage), remoteArchiveSupported_(false) { } diff --git a/Swift/Controllers/Roster/ItemOperations/SetMUC.h b/Swift/Controllers/Roster/ItemOperations/SetMUC.h index de40e04..598e5f5 100644 --- a/Swift/Controllers/Roster/ItemOperations/SetMUC.h +++ b/Swift/Controllers/Roster/ItemOperations/SetMUC.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2013 Kevin Smith and Remko Tronçon + * Copyright (c) 2013-2014 Kevin Smith and Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -32,5 +32,4 @@ class SetMUC : public RosterItemOperation { private: JID jid_; - bool mucParticipant_; MUCOccupant::Role mucRole_; MUCOccupant::Affiliation mucAffiliation_; diff --git a/Swift/Controllers/Storages/FileStorages.cpp b/Swift/Controllers/Storages/FileStorages.cpp index 52a5e00..e1b681f 100644 --- a/Swift/Controllers/Storages/FileStorages.cpp +++ b/Swift/Controllers/Storages/FileStorages.cpp @@ -23,4 +23,6 @@ FileStorages::FileStorages(const boost::filesystem::path& baseDir, const JID& ji #ifdef SWIFT_EXPERIMENTAL_HISTORY historyStorage = new SQLiteHistoryStorage(baseDir / "history.db"); +#else + historyStorage = NULL; #endif } @@ -31,7 +33,5 @@ FileStorages::~FileStorages() { delete capsStorage; delete vcardStorage; -#ifdef SWIFT_EXPERIMENTAL_HISTORY delete historyStorage; -#endif } diff --git a/Swift/Controllers/WhiteboardManager.cpp b/Swift/Controllers/WhiteboardManager.cpp index 50aba6f..d8d89eb 100644 --- a/Swift/Controllers/WhiteboardManager.cpp +++ b/Swift/Controllers/WhiteboardManager.cpp @@ -126,5 +126,7 @@ namespace Swift { void WhiteboardManager::handleSessionAccept(const JID& contact) { WhiteboardWindow* window = findWhiteboardWindow(contact); + if (window != NULL) { window->show(); + } onRequestAccepted(contact); } diff --git a/Swift/QtUI/QtAvatarWidget.cpp b/Swift/QtUI/QtAvatarWidget.cpp index 015c2da..fa08c27 100644 --- a/Swift/QtUI/QtAvatarWidget.cpp +++ b/Swift/QtUI/QtAvatarWidget.cpp @@ -1,8 +1,10 @@ /* - * Copyright (c) 2011-2013 Remko Tronçon + * Copyright (c) 2011-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ + + #include "QtAvatarWidget.h" @@ -24,5 +26,5 @@ namespace Swift { -QtAvatarWidget::QtAvatarWidget(QWidget* parent) : QWidget(parent) { +QtAvatarWidget::QtAvatarWidget(QWidget* parent) : QWidget(parent), editable(false) { QVBoxLayout* layout = new QVBoxLayout(this); layout->setContentsMargins(0,0,0,0); diff --git a/Swift/QtUI/QtPlainChatView.h b/Swift/QtUI/QtPlainChatView.h index 01b5925..cf65fb3 100644 --- a/Swift/QtUI/QtPlainChatView.h +++ b/Swift/QtUI/QtPlainChatView.h @@ -125,5 +125,4 @@ namespace Swift { UIEventStream* eventStream_; LogTextEdit* log_; - QMenu* logMenu_; FileTransferMap fileTransfers_; std::map<std::string, boost::shared_ptr<SecurityLabel> > lastMessageLabel_; diff --git a/Swift/QtUI/QtRosterHeader.cpp b/Swift/QtUI/QtRosterHeader.cpp index 44459d5..b9e7798 100644 --- a/Swift/QtUI/QtRosterHeader.cpp +++ b/Swift/QtUI/QtRosterHeader.cpp @@ -1,4 +1,4 @@ /* - * 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. @@ -24,5 +24,5 @@ namespace Swift { -QtRosterHeader::QtRosterHeader(SettingsProvider* settings, StatusCache* statusCache, QWidget* parent) : QWidget(parent) { +QtRosterHeader::QtRosterHeader(SettingsProvider* settings, StatusCache* statusCache, QWidget* parent) : QWidget(parent), statusEdit_(false) { QHBoxLayout* topLayout = new QHBoxLayout(); topLayout->setSpacing(3); diff --git a/Swift/QtUI/QtSystemTray.cpp b/Swift/QtUI/QtSystemTray.cpp index 456a56f..83018b8 100644 --- a/Swift/QtUI/QtSystemTray.cpp +++ b/Swift/QtUI/QtSystemTray.cpp @@ -1,4 +1,4 @@ /* - * 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. @@ -20,5 +20,5 @@ namespace Swift { -QtSystemTray::QtSystemTray() : QObject(), trayMenu_(0), onlineIcon_(":icons/online.png"), awayIcon_(":icons/away.png"), dndIcon_(":icons/dnd.png"), offlineIcon_(":icons/offline.png"), newMessageIcon_(":icons/new-chat.png"), throbberMovie_(":/icons/connecting.mng"), unreadMessages_(false), connecting_(false) { +QtSystemTray::QtSystemTray() : QObject(), statusType_(StatusShow::None), trayMenu_(0), onlineIcon_(":icons/online.png"), awayIcon_(":icons/away.png"), dndIcon_(":icons/dnd.png"), offlineIcon_(":icons/offline.png"), newMessageIcon_(":icons/new-chat.png"), throbberMovie_(":/icons/connecting.mng"), unreadMessages_(false), connecting_(false) { trayIcon_ = new QSystemTrayIcon(offlineIcon_); trayIcon_->setToolTip("Swift"); diff --git a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp index 4f1d3ab..877a598 100644 --- a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp +++ b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.cpp @@ -5,4 +5,11 @@ */ +/* + * Copyright (c) 2014 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + + #include "QtResizableLineEdit.h" @@ -10,5 +17,5 @@ namespace Swift { QtResizableLineEdit::QtResizableLineEdit(QWidget* parent) : - QLineEdit(parent) { + QLineEdit(parent), editable(false) { connect(this, SIGNAL(textChanged(QString)), SLOT(textChanged(QString))); setMinimumWidth(30); diff --git a/Swiften/Client/MemoryStorages.cpp b/Swiften/Client/MemoryStorages.cpp index 885d74f..850c1b2 100644 --- a/Swiften/Client/MemoryStorages.cpp +++ b/Swiften/Client/MemoryStorages.cpp @@ -21,4 +21,6 @@ MemoryStorages::MemoryStorages(CryptoProvider* crypto) { #ifdef SWIFT_EXPERIMENTAL_HISTORY historyStorage = new SQLiteHistoryStorage(":memory:"); +#else + historyStorage = NULL; #endif } @@ -29,7 +31,5 @@ MemoryStorages::~MemoryStorages() { delete capsStorage; delete vcardStorage; -#ifdef SWIFT_EXPERIMENTAL_HISTORY delete historyStorage; -#endif } diff --git a/Swiften/Elements/JingleContentPayload.h b/Swiften/Elements/JingleContentPayload.h index 547fc70..ac62866 100644 --- a/Swiften/Elements/JingleContentPayload.h +++ b/Swiften/Elements/JingleContentPayload.h @@ -27,4 +27,7 @@ namespace Swift { }; + JingleContentPayload() : creator(UnknownCreator) { + } + /*enum Senders { NoSenders, diff --git a/Swiften/Elements/JingleIBBTransportPayload.h b/Swiften/Elements/JingleIBBTransportPayload.h index a329ff0..5704c00 100644 --- a/Swiften/Elements/JingleIBBTransportPayload.h +++ b/Swiften/Elements/JingleIBBTransportPayload.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2011-2013 Remko Tronçon + * Copyright (c) 2011-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -23,4 +23,7 @@ namespace Swift { }; + JingleIBBTransportPayload() : stanzaType(IQStanza) { + } + void setStanzaType(StanzaType stanzaType) { this->stanzaType = stanzaType; diff --git a/Swiften/Elements/PubSubRetract.cpp b/Swiften/Elements/PubSubRetract.cpp index 7e5b720..41b9346 100644 --- a/Swiften/Elements/PubSubRetract.cpp +++ b/Swiften/Elements/PubSubRetract.cpp @@ -9,5 +9,5 @@ using namespace Swift; -PubSubRetract::PubSubRetract() { +PubSubRetract::PubSubRetract() : notify(false) { } diff --git a/Swiften/Elements/PubSubSubscribeOptions.cpp b/Swiften/Elements/PubSubSubscribeOptions.cpp index 3423d02..19cf084 100644 --- a/Swiften/Elements/PubSubSubscribeOptions.cpp +++ b/Swiften/Elements/PubSubSubscribeOptions.cpp @@ -9,5 +9,5 @@ using namespace Swift; -PubSubSubscribeOptions::PubSubSubscribeOptions() { +PubSubSubscribeOptions::PubSubSubscribeOptions() : required(false) { } diff --git a/Swiften/Elements/StreamManagementEnabled.cpp b/Swiften/Elements/StreamManagementEnabled.cpp index bab7516..1f1a1f5 100644 --- a/Swiften/Elements/StreamManagementEnabled.cpp +++ b/Swiften/Elements/StreamManagementEnabled.cpp @@ -1,4 +1,4 @@ /* - * Copyright (c) 2011 Remko Tronçon + * Copyright (c) 2011-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -9,5 +9,5 @@ using namespace Swift; -StreamManagementEnabled::StreamManagementEnabled() { +StreamManagementEnabled::StreamManagementEnabled() : resumeSupported(false) { } diff --git a/Swiften/Elements/Whiteboard/WhiteboardLineElement.h b/Swiften/Elements/Whiteboard/WhiteboardLineElement.h index 3c63afc..df6e7d6 100644 --- a/Swiften/Elements/Whiteboard/WhiteboardLineElement.h +++ b/Swiften/Elements/Whiteboard/WhiteboardLineElement.h @@ -5,4 +5,11 @@ */ +/* + * Copyright (c) 2014 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + + #pragma once @@ -15,5 +22,5 @@ namespace Swift { typedef boost::shared_ptr<WhiteboardLineElement> ref; public: - WhiteboardLineElement(int x1, int y1, int x2, int y2) { + WhiteboardLineElement(int x1, int y1, int x2, int y2) : penWidth_(1) { x1_ = x1; y1_ = y1; diff --git a/Swiften/Elements/Whiteboard/WhiteboardRectElement.h b/Swiften/Elements/Whiteboard/WhiteboardRectElement.h index 233b3fa..0fd1338 100644 --- a/Swiften/Elements/Whiteboard/WhiteboardRectElement.h +++ b/Swiften/Elements/Whiteboard/WhiteboardRectElement.h @@ -5,4 +5,10 @@ */ +/* + * Copyright (c) 2014 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #pragma once @@ -15,5 +21,5 @@ namespace Swift { typedef boost::shared_ptr<WhiteboardRectElement> ref; public: - WhiteboardRectElement(int x, int y, int width, int height) { + WhiteboardRectElement(int x, int y, int width, int height) : penWidth_(1) { x_ = x; y_ = y; diff --git a/Swiften/FileTransfer/FileTransfer.cpp b/Swiften/FileTransfer/FileTransfer.cpp index c11e8e4..912a78a 100644 --- a/Swiften/FileTransfer/FileTransfer.cpp +++ b/Swiften/FileTransfer/FileTransfer.cpp @@ -1,4 +1,4 @@ /* - * Copyright (c) 2013 Remko Tronçon + * Copyright (c) 2013-2014 Remko Tronçon * Licensed under the GNU General Public License. * See the COPYING file for more information. @@ -9,5 +9,5 @@ using namespace Swift; -FileTransfer::FileTransfer() { +FileTransfer::FileTransfer() : fileSizeInBytes(0) { } diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index 83f12f7..bde689e 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -33,4 +33,5 @@ BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XML sid_(), waitingForStartResponse_(false), + rid_(~0ULL), pending_(false), connectionReady_(false) diff --git a/Swiften/Network/SOCKS5ProxiedConnection.cpp b/Swiften/Network/SOCKS5ProxiedConnection.cpp index a9243d6..3fd8184 100644 --- a/Swiften/Network/SOCKS5ProxiedConnection.cpp +++ b/Swiften/Network/SOCKS5ProxiedConnection.cpp @@ -5,4 +5,10 @@ */ +/* + * Copyright (c) 2014 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #include <Swiften/Network/SOCKS5ProxiedConnection.h> @@ -25,5 +31,6 @@ SOCKS5ProxiedConnection::SOCKS5ProxiedConnection( const std::string& proxyHost, int proxyPort) : - ProxiedConnection(resolver, connectionFactory, timerFactory, proxyHost, proxyPort) { + ProxiedConnection(resolver, connectionFactory, timerFactory, proxyHost, proxyPort), + proxyState_(Initial) { } diff --git a/Swiften/Network/SOCKS5ProxiedConnection.h b/Swiften/Network/SOCKS5ProxiedConnection.h index 7906879..2c93468 100644 --- a/Swiften/Network/SOCKS5ProxiedConnection.h +++ b/Swiften/Network/SOCKS5ProxiedConnection.h @@ -30,5 +30,6 @@ namespace Swift { private: enum { - ProxyAuthenticating = 0, + Initial = 0, + ProxyAuthenticating, ProxyConnecting } proxyState_; |