mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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:
parent
faa6e2df56
commit
c86783ec75
2 changed files with 7 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue