[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: add filnameOfStore() to KoStore
From: Thomas Zander <zander () kde ! org>
Date: 2010-01-19 17:30:20
Message-ID: 201001191830.20670.zander () kde ! org
[Download RAW message or body]
Looking at the patch gives me the impression it was done a bit too fast, and
it could be made more maintainable :)
First; there is KoStoreBase::m_url already, which could be reused maybe?
I think the approach of altering the factory method to copy a string that is
also passed into each of the classes is a bit fragile. What about instead
adding this code to the store instances themselves? Maybe just passing through
on constructor chaining?
Next; I'm wondering if this is the correct approach anyway. Consider the
usecase where you click on a file on a website. KIO then downloads it from the
http url and makes your favorite koffice app open it from a tmp dir.
The relative path to the movie is then not on /tmp, but its on the http url.
As you store a QUrl your solution is incompatible with KIO.
On Sunday 17. January 2010 16.34.24 Casper Boemann wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2642/
> -----------------------------------------------------------
>
> Review request for KOffice.
>
>
> Summary
> -------
>
> Added a filenameOfStore() method and some code to make it work
>
> When loading ODF sometimes there is a href to a file relative to the store,
> so it's important that the loading code can find out what the url of the
> store is in order to resolve the relation.
>
>
> Diffs
> -----
>
> trunk/koffice/libs/store/KoStore.h 1074150
> trunk/koffice/libs/store/KoStore.cpp 1074150
>
> Diff: http://reviewboard.kde.org/r/2642/diff
>
>
> Testing
> -------
>
> I'm using it loacaly in my videoshape and it works.
> Not all means of creating a store will currently result in a valid url
> returned from filenameOfStore() but this is hinted at in the
> documentation.
>
>
> Thanks,
>
> Casper
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
>
--
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic