> On Sept. 2, 2014, 11:20 a.m., Sebastian Kügler wrote:
> > I don't fully understand how the "write to a different property" mechanism 
> > works. Could you expand on that?
> > 
> > The code overall looks quite good already, but without understanding the 
> > above, I don't dare giving it a shipit.
> 
> David Edmundson wrote:
>     I just meant I don't make noteText have a WRITE attribute and instead 
> have an explicit save() because otherwise we get people writing to the 
> property from two different directions. 
>     I was anticipating a review comment and was trying to explain myself 
> before it happened; clearly I didn't help much :)

No worries, I've just finished my coffee. I wouldn't necessary put the blame on 
your explanation. :)

What I still don't understand is how that's different from two different users 
just calling save(). I'm assuming two different users would be two different 
instances of the same note, for example on different containments, right?


- Sebastian


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


On Sept. 2, 2014, 11:02 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120036/
> -----------------------------------------------------------
> 
> (Updated Sept. 2, 2014, 11:02 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: kdeplasma-addons
> 
> 
> Description
> -------
> 
> The design:
>  There's a NoteLoader class, currently we just hardcode loading the 
> FileNoteLoader. The backend is refcounted between plasmoids.
>  NoteLoader acts as a factory class for creating Notes, which can be 
> subclassed and do whatever that needs to do (like loading async-ly)
>  
>  The QML side saves data on loss of focus and exit. We use explicitly 
> different loading and saving to different properties to avoid the mess of two 
> classes trying to write to the same property.
> 
> To explain the design, here are my long term goals:
> 
>  - never lose data if we wipe the relevant plasmarc
>  - the same notes editable in plasmawindowed as the desktop
>  - have the same note data on two containments
>  - easily make an Akonadi backend for notes so we share between knotes (hence 
> the abstract layer ATM). 
>  - allows the user to be creative (store in git, sync to owncloud, whatever). 
> Not stuff we should add in the UI, but we enable the user to do whatever.
> 
> I envision the settings module listing available notes. By default it just 
> creates a new note when you make a new plasmoid so 4.x behaviour is still 
> exactly the same as before /unless/ you go hunting for more things.
> 
> 
> Diffs
> -----
> 
>   applets/notes/plugin/note.cpp PRE-CREATION 
>   applets/notes/plugin/notemanager.h PRE-CREATION 
>   applets/notes/plugin/filesystemnoteloader.h PRE-CREATION 
>   applets/notes/plugin/filesystemnoteloader.cpp PRE-CREATION 
>   applets/notes/plugin/note.h PRE-CREATION 
>   applets/notes/plugin/abstractnoteloader.cpp PRE-CREATION 
>   applets/notes/plugin/documenthandler.h fd3bdd0 
>   applets/notes/plugin/documenthandler.cpp b0a603a 
>   applets/notes/CMakeLists.txt c980cb0 
>   applets/notes/package/contents/config/main.xml a614f7e 
>   applets/notes/package/contents/ui/main.qml 1213f48 
>   applets/notes/plugin/abstractnoteloader.h PRE-CREATION 
>   applets/notes/plugin/notemanager.cpp PRE-CREATION 
>   applets/notes/plugin/notesplugin.cpp 890caeb 
> 
> Diff: https://git.reviewboard.kde.org/r/120036/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to