diff options
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/Controllers/AccountController.cpp | 28 | ||||
-rw-r--r-- | Swift/Controllers/Settings/XMLSettingsProvider.cpp | 6 | ||||
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 32 | ||||
-rw-r--r-- | Swift/QtUI/Roster/QtFilterWidget.cpp | 2 |
4 files changed, 32 insertions, 36 deletions
diff --git a/Swift/Controllers/AccountController.cpp b/Swift/Controllers/AccountController.cpp index 27655c0..b877ce9 100644 --- a/Swift/Controllers/AccountController.cpp +++ b/Swift/Controllers/AccountController.cpp @@ -840,18 +840,18 @@ void AccountController::handleQuitRequest() { std::string AccountController::serializeClientOptions(const ClientOptions& options) { std::string result; - SERIALIZE_BOOL(useStreamCompression); + SERIALIZE_BOOL(useStreamCompression) switch (options.useTLS) { case ClientOptions::NeverUseTLS: result += "1";break; case ClientOptions::UseTLSWhenAvailable: result += "2";break; case ClientOptions::RequireTLS: result += "3";break; } result += ","; - SERIALIZE_BOOL(allowPLAINWithoutTLS); - SERIALIZE_BOOL(useStreamResumption); - SERIALIZE_BOOL(useAcks); - SERIALIZE_STRING(manualHostname); - SERIALIZE_INT(manualPort); + SERIALIZE_BOOL(allowPLAINWithoutTLS) + SERIALIZE_BOOL(useStreamResumption) + SERIALIZE_BOOL(useAcks) + SERIALIZE_STRING(manualHostname) + SERIALIZE_INT(manualPort) switch (options.proxyType) { case ClientOptions::NoProxy: result += "1";break; case ClientOptions::SystemConfiguredProxy: result += "2";break; @@ -859,14 +859,14 @@ std::string AccountController::serializeClientOptions(const ClientOptions& optio case ClientOptions::HTTPConnectProxy: result += "4";break; } result += ","; - SERIALIZE_STRING(manualProxyHostname); - SERIALIZE_INT(manualProxyPort); - SERIALIZE_URL(boshURL); - SERIALIZE_URL(boshHTTPConnectProxyURL); - SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthID); - SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthPassword); - SERIALIZE_BOOL(tlsOptions.schannelTLS1_0Workaround); - SERIALIZE_BOOL(singleSignOn); + SERIALIZE_STRING(manualProxyHostname) + SERIALIZE_INT(manualProxyPort) + SERIALIZE_URL(boshURL) + SERIALIZE_URL(boshHTTPConnectProxyURL) + SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthID) + SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthPassword) + SERIALIZE_BOOL(tlsOptions.schannelTLS1_0Workaround) + SERIALIZE_BOOL(singleSignOn) return result; } diff --git a/Swift/Controllers/Settings/XMLSettingsProvider.cpp b/Swift/Controllers/Settings/XMLSettingsProvider.cpp index 8415209..f1049f1 100644 --- a/Swift/Controllers/Settings/XMLSettingsProvider.cpp +++ b/Swift/Controllers/Settings/XMLSettingsProvider.cpp @@ -68,7 +68,7 @@ int XMLSettingsProvider::getSetting(const Setting<int>& setting) { if (values_.find(setting.getKey()) != values_.end()) { std::string value = values_[setting.getKey()]; try { - return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value);; + return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value); } catch(boost::bad_lexical_cast &) {} } @@ -123,7 +123,3 @@ void XMLSettingsProvider::handleCharacterData(const std::string& data) { } - - - - diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 8de5d70..f1ad38e 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -446,34 +446,34 @@ ClientOptions QtSwift::parseClientOptions(const std::string& optionString) { std::string stringVal; std::vector<std::string> segments = String::split(optionString, ','); - PARSE_BOOL(useStreamCompression, 1); - PARSE_INT_RAW(-1); + PARSE_BOOL(useStreamCompression, 1) + PARSE_INT_RAW(-1) switch (intVal) { case 1: result.useTLS = ClientOptions::NeverUseTLS; break; case 2: result.useTLS = ClientOptions::UseTLSWhenAvailable; break; case 3: result.useTLS = ClientOptions::RequireTLS; break; default:; } - PARSE_BOOL(allowPLAINWithoutTLS, 0); - PARSE_BOOL(useStreamResumption, 0); - PARSE_BOOL(useAcks, 1); - PARSE_STRING(manualHostname); - PARSE_INT(manualPort, -1); - PARSE_INT_RAW(-1); + PARSE_BOOL(allowPLAINWithoutTLS, 0) + PARSE_BOOL(useStreamResumption, 0) + PARSE_BOOL(useAcks, 1) + PARSE_STRING(manualHostname) + PARSE_INT(manualPort, -1) + PARSE_INT_RAW(-1) switch (intVal) { case 1: result.proxyType = ClientOptions::NoProxy; break; case 2: result.proxyType = ClientOptions::SystemConfiguredProxy; break; case 3: result.proxyType = ClientOptions::SOCKS5Proxy; break; case 4: result.proxyType = ClientOptions::HTTPConnectProxy; break; } - PARSE_STRING(manualProxyHostname); - PARSE_INT(manualProxyPort, -1); - PARSE_URL(boshURL); - PARSE_URL(boshHTTPConnectProxyURL); - PARSE_SAFE_STRING(boshHTTPConnectProxyAuthID); - PARSE_SAFE_STRING(boshHTTPConnectProxyAuthPassword); - PARSE_BOOL(tlsOptions.schannelTLS1_0Workaround, false); - PARSE_BOOL(singleSignOn, false); + PARSE_STRING(manualProxyHostname) + PARSE_INT(manualProxyPort, -1) + PARSE_URL(boshURL) + PARSE_URL(boshHTTPConnectProxyURL) + PARSE_SAFE_STRING(boshHTTPConnectProxyAuthID) + PARSE_SAFE_STRING(boshHTTPConnectProxyAuthPassword) + PARSE_BOOL(tlsOptions.schannelTLS1_0Workaround, false) + PARSE_BOOL(singleSignOn, false) return result; } diff --git a/Swift/QtUI/Roster/QtFilterWidget.cpp b/Swift/QtUI/Roster/QtFilterWidget.cpp index 2f561bd..c017d29 100644 --- a/Swift/QtUI/Roster/QtFilterWidget.cpp +++ b/Swift/QtUI/Roster/QtFilterWidget.cpp @@ -82,7 +82,7 @@ bool QtFilterWidget::eventFilter(QObject*, QEvent* event) { } else if ((keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_) || (keyEvent->key() == Qt::Key_Menu)) { QPoint itemOffset(2,2); - QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset;; + QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset; QApplication::postEvent(treeView_, new QContextMenuEvent(QContextMenuEvent::Keyboard, contextMenuPosition, treeView_->mapToGlobal(contextMenuPosition))); return true; } else if (keyEvent->key() == Qt::Key_Return) { |