[PATCH] KParts::ReadWritePart::saveAs - again ;-)

David Faure faure at kde.org
Wed Mar 10 12:51:08 GMT 2004


On Wednesday 10 March 2004 13:36, Andras Mantia wrote:
> So in case of a local file completed() is emitted if saveFile() returns true.
Oh. I had missed that fact. Then it would be consistent to emit canceled too.
With QString::null as argument, since anything else would be shown to the user
in a message box, and it's hard at that point to know why it failed
(giving a non-empty string there would break koffice).

> The documentation says that the error message should be displayed by the part
> in the saveFile() (On failure the function should inform the user about the
> problem with an appropriate message box.), so I even wonder what is the use
> of the QString argument of canceled() if everyone follows the documentation.
None, for local files, indeed.

> Right, and the current solution breaks the idea of network transparency. The
> caller shouldn't need to make a difference between local or remote files.
> Call saveAs() and treat the success/failure in the same way without caring
> about the file type.
OK.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list