Review Request 128510: KNewFileMenu: fix copying template file from embedded resource

Wolfgang Bauer wbauer at tmo.at
Sun Jul 24 09:44:10 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128510/
-----------------------------------------------------------

(Updated July 24, 2016, 9:44 a.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks, Chinmoy Ranjan Pradhan and David Faure.


Changes
-------

Submitted with commit dc8588efe72a5ca7670d0371537d99a0d4c690f5 by David Faure to branch master.


Bugs: 359581
    https://bugs.kde.org/show_bug.cgi?id=359581


Repository: kio


Description
-------

KIO::storedTransferJob apparently doesn't support copying "files" from embedded Qt resources.
Therefore creating a new file via the "Create New" context menu results in an empty file in that case.

This patch fixes it by reading the source file into a QByteArray buffer first.


Diffs
-----

  src/filewidgets/knewfilemenu.cpp 4908e4c 

Diff: https://git.reviewboard.kde.org/r/128510/diff/


Testing
-------

Use "Create New"->"Text File" or "Create New"->HTML File" (in dolphin or the folderview plasmoid).
Before only an empty file was created, now the file has the intended content, and therefore the mimetype is also recognized correctly if it has no extension.


Thanks,

Wolfgang Bauer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160724/90cf1028/attachment.html>


More information about the Kde-frameworks-devel mailing list