47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
--- branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguiclient.cpp 2010/11/16 00:37:04 1197481
|
|
+++ branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguiclient.cpp 2010/11/16 00:37:17 1197482
|
|
@@ -97,10 +97,12 @@
|
|
}
|
|
|
|
if ( d->m_factory ) {
|
|
- d->m_factory->removeClient ( this );
|
|
+ d->m_factory->forgetClient(this);
|
|
}
|
|
-
|
|
+
|
|
foreach (KXMLGUIClient* client, d->m_children) {
|
|
+ if (d->m_factory)
|
|
+ d->m_factory->forgetClient(client);
|
|
assert( client->d->m_parent == this );
|
|
client->d->m_parent = 0;
|
|
}
|
|
--- branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguifactory.cpp 2010/11/16 00:37:04 1197481
|
|
+++ branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguifactory.cpp 2010/11/16 00:37:17 1197482
|
|
@@ -388,6 +388,11 @@
|
|
refreshActionProperties();
|
|
}
|
|
|
|
+void KXMLGUIFactory::forgetClient( KXMLGUIClient *client )
|
|
+{
|
|
+ d->m_clients.removeAll( client );
|
|
+}
|
|
+
|
|
void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
|
|
{
|
|
//kDebug(260) << client;
|
|
--- branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguifactory.h 2010/11/16 00:37:04 1197481
|
|
+++ branches/KDE/4.5/kdelibs/kdeui/xmlgui/kxmlguifactory.h 2010/11/16 00:37:17 1197482
|
|
@@ -216,7 +216,11 @@
|
|
void makingChanges(bool);
|
|
|
|
private:
|
|
- KXMLGUIFactoryPrivate *const d;
|
|
+ friend class KXMLGUIClient;
|
|
+ /// Internal, called by KXMLGUIClient destructor
|
|
+ void forgetClient(KXMLGUIClient *client);
|
|
+
|
|
+ KXMLGUIFactoryPrivate *const d;
|
|
};
|
|
|
|
#endif
|