From 35f61f80a0fbacff1d7c90aa10b7e7686208b82e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 30 Apr 2018 17:00:31 +0900 Subject: Fixed service lookup in KOpenWithDlg. Default is now to lookup by desktop path and not by name, to avoid returning the wrong service when two or more .desktop files where using the same "Name" field. This resolves bug 2734 (together with the changes made in applications/kcmautostart) Signed-off-by: Michele Calgaro (cherry picked from commit bcdfbb95e94db26bf984443ce583d919a330058c) --- tdeio/tdefile/kopenwith_p.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tdeio/tdefile/kopenwith_p.h') diff --git a/tdeio/tdefile/kopenwith_p.h b/tdeio/tdefile/kopenwith_p.h index a0f7eb77c..4f6d53107 100644 --- a/tdeio/tdefile/kopenwith_p.h +++ b/tdeio/tdefile/kopenwith_p.h @@ -43,18 +43,20 @@ class KAppTreeListItem : public TQListViewItem bool directory; TQString path; TQString exec; + TQString desktopPath; protected: int compare(TQListViewItem *i, int col, bool ascending ) const; TQString key(int column, bool ascending) const; - void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec); + void init(const TQPixmap& pixmap, bool parse, bool dir, + const TQString &_path, const TQString &exec, const TQString &_desktopPath); public: KAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, - bool parse, bool dir, const TQString &p, const TQString &c ); + bool parse, bool dir, const TQString &p, const TQString &c, const TQString &dp ); KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, - bool parse, bool dir, const TQString &p, const TQString &c ); + bool parse, bool dir, const TQString &p, const TQString &c, const TQString &dp ); bool isDirectory(); protected: @@ -92,8 +94,8 @@ public slots: void slotSelectionChanged(TQListViewItem* i); signals: - void selected( const TQString& _name, const TQString& _exec ); - void highlighted( const TQString& _name, const TQString& _exec ); + void selected( const TQString& _name, const TQString& _exec, const TQString& _desktopPath ); + void highlighted( const TQString& _name, const TQString& _exec, const TQString& _desktopPath ); }; /* ------------------------------------------------------------------------- */ -- cgit v1.2.1