From 7bae6c6b8afead51c29e6891632ebd1deb19dfac Mon Sep 17 00:00:00 2001
From: Leo Franchi <lfranchi@kde.org>
Date: Fri, 10 Feb 2012 18:45:28 -0500
Subject: [PATCH] fix deleting

---
 src/delegateconfigwrapper.h | 2 +-
 src/settingsdialog.cpp      | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/delegateconfigwrapper.h b/src/delegateconfigwrapper.h
index 5bd4faad6..4a2d4bfd1 100644
--- a/src/delegateconfigwrapper.h
+++ b/src/delegateconfigwrapper.h
@@ -89,7 +89,7 @@ public slots:
         else if ( b == m_deleteButton )
         {
             m_deleted = true;
-            emit deleted();
+            emit closedWithDelete();
             reject();
         }
         else
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
index e3f73d2b3..388977d18 100644
--- a/src/settingsdialog.cpp
+++ b/src/settingsdialog.cpp
@@ -444,7 +444,7 @@ SettingsDialog::openAccountConfig( Account* account, bool showDelete )
 {
     if( account->configurationWidget() )
     {
-#ifndef Q_WS_MAC
+#if 0
         DelegateConfigWrapper dialog( account->configurationWidget(), QString("%1 Configuration" ).arg( account->accountFriendlyName() ), this );
         dialog.setShowDelete( showDelete );
         QWeakPointer< DelegateConfigWrapper > watcher( &dialog );
@@ -491,8 +491,6 @@ SettingsDialog::accountConfigDelete()
     Account* account = qobject_cast< Account* >( dialog->property( "accountplugin" ).value< QObject* >() );
     Q_ASSERT( account );
     AccountManager::instance()->removeAccount( account );
-
-    sender()->deleteLater();
 }