1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02:00

fix crash on closing account config dialog

This commit is contained in:
Leo Franchi
2011-12-31 18:00:19 -06:00
parent aaf147a39a
commit 801d7e5d89
3 changed files with 8 additions and 5 deletions

View File

@@ -53,7 +53,6 @@ XmppAccount::XmppAccount( const QString &accountId )
XmppAccount::~XmppAccount()
{
delete m_configWidget.data();
delete m_xmppSipPlugin.data();
}

View File

@@ -22,6 +22,7 @@
#include <QDialogButtonBox>
#include <QVBoxLayout>
#include <QPushButton>
#include <QDebug>
class DelegateConfigWrapper : public QDialog
{
@@ -33,7 +34,6 @@ public:
#ifdef Q_WS_MAC
m_widget->setVisible( true );
#endif
setWindowTitle( title );
QVBoxLayout* v = new QVBoxLayout( this );
v->setContentsMargins( 0, 0, 0, 0 );
@@ -59,6 +59,9 @@ public:
#endif
}
~DelegateConfigWrapper() { delete m_widget; }
public slots:
void toggleOkButton( bool dataError )
{

View File

@@ -731,7 +731,7 @@ SettingsDialog::handleAccountAdded( Account* account, bool added )
AccountManager::instance()->addAccount( account );
AccountManager::instance()->hookupAndEnable( account );
if( f && f->isUnique() )
if ( f && f->isUnique() )
{
// remove from actions list
QAction* toremove = 0;
@@ -743,12 +743,13 @@ SettingsDialog::handleAccountAdded( Account* account, bool added )
break;
}
}
if( toremove )
if ( toremove )
ui->addSipButton->removeAction( toremove );
}
}
else
{ // user pressed cancel
{
// user pressed cancel
delete account;
}
}