summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/ShowProfileController.cpp')
-rw-r--r--Swift/Controllers/ShowProfileController.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Swift/Controllers/ShowProfileController.cpp b/Swift/Controllers/ShowProfileController.cpp
index ee0854b..15b7b26 100644
--- a/Swift/Controllers/ShowProfileController.cpp
+++ b/Swift/Controllers/ShowProfileController.cpp
@@ -25,7 +25,7 @@ ShowProfileController::ShowProfileController(VCardManager* vcardManager, Profile
ShowProfileController::~ShowProfileController() {
typedef std::pair<JID, ProfileWindow*> JIDProfileWindowPair;
foreach(const JIDProfileWindowPair& jidWndPair, openedProfileWindows) {
- jidWndPair.second->onWindowClosed.disconnect(boost::bind(&ShowProfileController::handleProfileWindowClosed, this, _1));
+ jidWndPair.second->onWindowAboutToBeClosed.disconnect(boost::bind(&ShowProfileController::handleProfileWindowAboutToBeClosed, this, _1));
delete jidWndPair.second;
}
@@ -42,7 +42,7 @@ void ShowProfileController::handleUIEvent(UIEvent::ref event) {
if (openedProfileWindows.find(showProfileEvent->getJID()) == openedProfileWindows.end()) {
ProfileWindow* newProfileWindow = profileWindowFactory->createProfileWindow();
newProfileWindow->setJID(showProfileEvent->getJID());
- newProfileWindow->onWindowClosed.connect(boost::bind(&ShowProfileController::handleProfileWindowClosed, this, _1));
+ newProfileWindow->onWindowAboutToBeClosed.connect(boost::bind(&ShowProfileController::handleProfileWindowAboutToBeClosed, this, _1));
openedProfileWindows[showProfileEvent->getJID()] = newProfileWindow;
VCard::ref vcard = vcardManager->getVCardAndRequestWhenNeeded(showProfileEvent->getJID());
if (vcard) {
@@ -67,10 +67,8 @@ void ShowProfileController::handleVCardChanged(const JID& jid, VCard::ref vcard)
profileWindow->show();
}
-void ShowProfileController::handleProfileWindowClosed(const JID& profileJid) {
- ProfileWindow* profileWindow = openedProfileWindows[profileJid];
+void ShowProfileController::handleProfileWindowAboutToBeClosed(const JID& profileJid) {
openedProfileWindows.erase(profileJid);
- delete profileWindow;
}
}