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

List:       kde-commits
Subject:    kdenetwork/kopete
From:       Martijn Klingens <klingens () kde ! org>
Date:       2003-10-05 21:24:17
[Download RAW message or body]

CVS commit by mklingens: 

API for async unloading of the plugins on exit.

Let's start with a big fat note that applies more to kdelibs in general:
---------------------------------------------------------------------------
I had to comment out my call to m_mainWindow->close(). Clicking Quit from
the systray also closes the main window, which derefs kapp. The call to
close in quitKopete calls close() another time, dereffing again, leaving
the refcount at 0 and quitting Kopete.

After adding several kdBacktraces it is really calling it twice, there's
only one KMainWindow at the time and valgrind does NOT (!) spot the use
of deleted memory even though the window has its default W_DestructiveClose
flag set. The only explanation I can come up with is that the destructive
close is posted as a deleteLater() call and still in the event queue.

The really bad thing about this though is that apparently the deref() call
in KMainWindow doesn't check for reentrancy. I wonder how to fix this.
---------------------------------------------------------------------------

There are a couple of rough edges still that I'll address shortly in some
separate smaller commits, but this is the API for the basic plugins.
Protocol plugins will need additional support in KopeteProtocol.

(I don't think we have many non-protocols that can make use of this, but
if there are, feel free to use this API for them already)


  M +4 -3      kopete/kopete.cpp   1.159
  M +1 -1      libkopete/kopeteaccountmanager.cpp   1.36
  M +6 -0      libkopete/kopeteplugin.cpp   1.27
  M +19 -0     libkopete/kopeteplugin.h   1.26
  M +58 -4     libkopete/kopetepluginmanager.cpp   1.8
  M +20 -10    libkopete/kopetepluginmanager.h   1.6



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

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