[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/taskmanager
From:       Frerich Raabe <raabe () kde ! org>
Date:       2007-10-21 16:09:52
Message-ID: 1192982992.080621.26724.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 727734 by raabe:

- Don't specify a parent QObject here so that we can control the lifetime
  better. References to Task or Startup objects are used all over the place
  and everywhere we rely on the reference counting to do the right thing. Qt
  would delete the Task and Startup objects when the TaskManager object gets
  destroyed - without caring about our reference counting at all.


 M  +2 -2      taskmanager.cpp  


--- trunk/KDE/kdebase/workspace/libs/taskmanager/taskmanager.cpp #727733:727734
@@ -354,7 +354,7 @@
         }
     }
 
-    Task::TaskPtr t( new Task( w, this ) );
+    Task::TaskPtr t( new Task( w, 0 ) );
     d->tasksByWId[w] = t;
 
     // kDebug() << "TM: Task added for WId: " << w;
@@ -518,7 +518,7 @@
 
 void TaskManager::gotNewStartup( const KStartupInfoId& id, const KStartupInfoData& data )
 {
-    Startup::StartupPtr s( new Startup( id, data, this ) );
+    Startup::StartupPtr s( new Startup( id, data, 0 ) );
     d->startups.append(s);
 
     emit startupAdded(s);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic