From 8af6fb273cb433ece756459d887c411c61ddcd76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 24 Oct 2010 17:53:16 +0200 Subject: Remove some unused code in MainController. diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index c69aa00..b02c78b 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include "Swiften/Network/BoostTimerFactory.h" #include "Swiften/Network/BoostIOServiceThread.h" @@ -61,8 +60,6 @@ namespace Swift { static const String CLIENT_NAME = "Swift"; -//static const String CLIENT_VERSION = "1.0-beta1"; -static const String CLIENT_VERSION = "1.0-devel"; static const String CLIENT_NODE = "http://swift.im"; static const String SHOW_NOTIFICATIONS = "showNotifications"; @@ -91,7 +88,6 @@ MainController::MainController( settings_(settings), loginWindow_(NULL) , useDelayForLatency_(useDelayForLatency) { - storages_ = NULL; statusTracker_ = NULL; client_ = NULL; @@ -103,7 +99,6 @@ MainController::MainController( discoResponder_ = NULL; mucSearchController_ = NULL; - timeBeforeNextReconnect_ = -1; mucSearchWindowFactory_ = mucSearchWindowFactory; eventWindowFactory_ = eventWindowFactory; @@ -148,7 +143,6 @@ MainController::MainController( uiEventStream_->onUIEvent.connect(boost::bind(&MainController::handleUIEvent, this, _1)); bool enabled = settings_->getBoolSetting(SHOW_NOTIFICATIONS, true); uiEventStream_->send(boost::shared_ptr(new ToggleNotificationsUIEvent(enabled))); - if (loginAutomatically) { profileSettings_ = new ProfileSettingsProvider(selectedLoginJID, settings_); @@ -431,9 +425,7 @@ void MainController::handleError(const ClientError& error) { logout(); setReconnectTimer(); if (lastDisconnectError_) { - std::stringstream ss; - ss << "Reconnect to " << jid_.getDomain() << " failed: " << message << ". Will retry in " << timeBeforeNextReconnect_ << " seconds."; - message = ss.str(); + message = "Reconnect to " + jid_.getDomain() + " failed: " + message + ". Will retry in " + boost::lexical_cast(timeBeforeNextReconnect_) + " seconds."; lastDisconnectError_->conclude(); } else { message = "Disconnected from " + jid_.getDomain() + ": " + message; @@ -490,8 +482,6 @@ void MainController::setManagersOffline() { } } - - void MainController::handleServerDiscoInfoResponse(boost::shared_ptr info, const boost::optional& error) { if (!error) { chatsManager_->setServerDiscoInfo(info); -- cgit v0.10.2-6-g49f6