Merged revision 847205:

Fix exit detection here, too, in case konqueror dies for some reason, 
due to kill -9 or something. (Why else wouldn't it exit normally?)

svn path=/trunk/KDE/kdebase/apps/; revision=847206
This commit is contained in:
Maks Orlovich 2008-08-14 23:06:11 +00:00
parent faa6e2df56
commit c86783ec75
2 changed files with 7 additions and 8 deletions

View file

@ -1144,8 +1144,8 @@ NSPluginViewer::NSPluginViewer( QObject *parent )
QDBusConnection::sessionBus().registerObject( "/Viewer", this );
QObject::connect(QDBusConnection::sessionBus().interface(),
SIGNAL(serviceUnregistered(const QString&)),
this, SLOT(appUnregistered(const QString&)));
SIGNAL(serviceOwnerChanged(const QString&, const QString&, const QString&)),
this, SLOT(appChanged( const QString&, const QString&, const QString&)));
}
@ -1155,16 +1155,15 @@ NSPluginViewer::~NSPluginViewer()
}
void NSPluginViewer::appUnregistered(const QString& id) {
if (id.isEmpty()) {
return;
}
void NSPluginViewer::appChanged( const QString& id, const QString& oldOwner, const QString& newOwner) {
if ( oldOwner.isEmpty() || !newOwner.isEmpty() ) // only care about unregistering apps
return;
QMap<QString, NSPluginClass*>::iterator it = _classes.begin();
const QMap<QString, NSPluginClass*>::iterator end = _classes.end();
for ( ; it != end; ++it )
{
if (it.value()->app() == id) {
if (it.value()->app() == oldOwner) {
it = _classes.erase(it);
}
}

View file

@ -330,7 +330,7 @@ public:
QDBusObjectPath newClass( const QString& plugin, const QString& senderId );
private Q_SLOTS:
void appUnregistered(const QString& id);
void appChanged( const QString& id, const QString& oldOwner, const QString& newOwner);
private:
QMap<QString, NSPluginClass *> _classes;