KNewFileMenu: Fix creating link to application

Review Request #128501 - Created July 22, 2016 and submitted

Information
Chinmoy Ranjan Pradhan
kio
master
363673
Reviewers
kdeframeworks
dfaure

Fix for the bug https://bugs.kde.org/show_bug.cgi?id=363673 . The bug occurs because KPropertiesDialog is initialized (inside KNewFileMenuPrivate::executeOtherDesktopFile) with path of a resource file. Now KPropertiesDialog only show properties if the file is a local file(i guess). Thats why clicking on "Link to Application" and then clicking 'ok' shows an error message . To Fix this i used QTemporaryFile to copy the contents of the application template shipped with kio and then initialize KPropertiesDialog with the temporary files' path.
(I added KNewFileMenuPrivate::mostLocalUrl here to ensure new filename is suggested when inside "desktop:/".)
(The temporary file created here must be deleted so i also added QFile::remove to _k_slotOtherDesktopFile and _k_slotAbortDialog so that whether or not the user creates a Link to Application, the temporary is always deleted)


  

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
David Faure
Chinmoy Ranjan Pradhan
David Faure
Chinmoy Ranjan Pradhan
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 525232d30ee682de4778667c8244778b50620e67 by David Faure on behalf of Chinmoy Ranjan Pradhan to branch master.
Loading...