mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
fix crash on closing account config dialog
This commit is contained in:
@@ -53,7 +53,6 @@ XmppAccount::XmppAccount( const QString &accountId )
|
||||
|
||||
XmppAccount::~XmppAccount()
|
||||
{
|
||||
delete m_configWidget.data();
|
||||
delete m_xmppSipPlugin.data();
|
||||
}
|
||||
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user