You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-desktop/0007-Fix-double-click.patch

36 lines
1.4 KiB

From 429d1bb6bfb32c4a4ad3e9e682513ab2625c823c Mon Sep 17 00:00:00 2001
From: Montel Laurent <montel@kde.org>
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<AutoStartItem*>( ent );
- if ( entry )
+ DesktopStartItem *desktopEntry = dynamic_cast<DesktopStartItem*>( 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<DesktopStartItem*>( 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