Commit e19e03dd authored by Alexey Chernov's avatar Alexey Chernov Committed by Pali Rohár

Prevent crash on closing settings window

You basically don't want to delete preview account prematurely as
it's successfully deleted with the window and doesn't send any
waste signals this way.
parent c4efffee
......@@ -239,9 +239,6 @@ ChatWindowConfig::~ChatWindowConfig()
// Deleting the account will delete jack and myself
delete m_previewAccount;
delete m_jackMetaContact;
delete m_previewProtocol;
......@@ -270,7 +267,7 @@ void ChatWindowConfig::save()
Kopete::AppearanceSettings *appearanceSettings = Kopete::AppearanceSettings::self();
QListWidgetItem *item = m_emoticonsUi.icon_theme_list->currentItem();
if (item)
KEmoticons::setTheme( item->text() );
......@@ -489,10 +486,10 @@ void ChatWindowConfig::slotGetChatStyles()
configGrp.writeEntry("ProvidersUrl", "");
configGrp.writeEntry("TargetDir", "kopete_chatstyles");
KNS::Engine *engine = new KNS::Engine();
// FIXME: Upon closing the Settings KCMultiDialog all KCMs are deleted and when reopening
// the settings dialog there is no active valid KComponentData, which KNS2 relies on.
// Forcing an active one below works around bug 163382, but the problem is somewhere else.
......@@ -556,7 +553,7 @@ void ChatWindowConfig::slotGetChatStyles()
void ChatWindowConfig::createPreviewChatSession()
m_previewProtocol = new FakeProtocol( 0 );
m_previewProtocol = new FakeProtocol( 0 );
m_previewProtocol->setObjectName( QLatin1String("kopete-preview-chatwindowstyle") );
m_previewAccount = new FakeAccount(m_previewProtocol, QString("previewaccount"));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment