From 429d1bb6bfb32c4a4ad3e9e682513ab2625c823c Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sun, 8 Mar 2015 09:09:01 +0100 Subject: [PATCH 7/8] Fix double click --- kcms/autostart/autostart.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kcms/autostart/autostart.cpp b/kcms/autostart/autostart.cpp index fd41fc8..b102323 100644 --- a/kcms/autostart/autostart.cpp +++ b/kcms/autostart/autostart.cpp @@ -353,14 +353,14 @@ void Autostart::slotRemoveCMD() void Autostart::slotEditCMD(QTreeWidgetItem* ent) { + if (!ent) return; - AutoStartItem *entry = dynamic_cast( ent ); - if ( entry ) + DesktopStartItem *desktopEntry = dynamic_cast( ent ); + if ( desktopEntry ) { - const KFileItem kfi = KFileItem( KFileItem::Unknown, KFileItem::Unknown, QUrl( entry->fileName() ), true ); + const KFileItem kfi = KFileItem( KFileItem::Unknown, KFileItem::Unknown, QUrl( desktopEntry->fileName() ), true ); if (! slotEditCMD( kfi )) return; - DesktopStartItem *desktopEntry = dynamic_cast( entry ); if (desktopEntry) { KService service(desktopEntry->fileName().path()); addItem( desktopEntry, service.name(), m_pathName.value(m_paths.indexOf(desktopEntry->fileName().adjusted(QUrl::RemoveFilename).toString())), service.exec(),false ); -- 1.9.3