Hi all,

Just looking around for some reason at the code I saw a TODO here, and
I think this is what you wanted.

Please tell me if the attached patch is OK to commit.


Bye,
Rafael Fernández López.
Index: kopete/libkopete/ui/kopetestdaction.h
===================================================================
--- kopete/libkopete/ui/kopetestdaction.h	(revisión: 707282)
+++ kopete/libkopete/ui/kopetestdaction.h	(copia de trabajo)
@@ -119,8 +119,6 @@
 
 	  protected slots:
 			 void slotShowPreferences();
-	  private:
-			 static KSettings::Dialog *s_settingsDialog;
 };
 
 #endif
Index: kopete/libkopete/ui/kopetestdaction.cpp
===================================================================
--- kopete/libkopete/ui/kopetestdaction.cpp	(revisión: 707282)
+++ kopete/libkopete/ui/kopetestdaction.cpp	(copia de trabajo)
@@ -30,13 +30,14 @@
 #include <kwindowsystem.h>
 #include <kcmultidialog.h>
 #include <kicon.h>
+#include <kglobal.h>
 
 #include "kopetecontactlist.h"
 #include "kopetegroup.h"
 #include "kopeteuiglobal.h"
 #include <kactioncollection.h>
 
-KSettings::Dialog *KopetePreferencesAction::s_settingsDialog = 0L;
+K_GLOBAL_STATIC(KSettings::Dialog, s_settingsDialog);
 
 KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, const char *name )
 : KAction( KIcon(KStandardGuiItem::configure().iconName()), KStandardGuiItem::configure().text(), parent )
@@ -51,11 +52,6 @@
 
 void KopetePreferencesAction::slotShowPreferences()
 {
-	// FIXME: Use static deleter - Martijn
-	if ( !s_settingsDialog )
-	{
-		s_settingsDialog = new KSettings::Dialog( Kopete::UI::Global::mainWidget() );
-	}
 	s_settingsDialog->show();
 
 	s_settingsDialog->raise();
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to