hein marked an inline comment as done.
hein added inline comments.

INLINE COMMENTS

> graesslin wrote in xwindowtasksmodel.cpp:490-499
> In KWin we also ensure that the desktopFile ends with .desktop prior to 
> passing to KDesktopFile:
> 
>   
>   QString desktopFile = QString::fromUtf8(m_desktopFileName);
>   if (!desktopFile.endsWith(QLatin1String(".desktop"))) {
>       desktopFile.append(QLatin1String(".desktop"));
>   }
> 
> The desktoFileName is without the .desktop suffix.

> In KWin we also ensure that the desktopFile ends with .desktop prior to 
> passing to KDesktopFile

This shouldn't be necessary. "Passing to KDesktopFile" in this code's case is 
calling KDesktopFile::isDesktopFile, which is documented to do the following:

"The check is performed looking at the file extension (the file is not opened). 
Currently, the only valid extension is ".desktop". "

I.e. checking for the extension isn't necessary, that's what isDesktopFile() is 
doing. Basically, we try to find a KService first, and if that fails we check 
if it's a .desktop file and whether it exists, then use it.

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D3262

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: hein, #plasma, graesslin
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas

Reply via email to