-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add share manager and the share objects #4033
Conversation
* This is needed so we can update the share objects properly | ||
* | ||
* @param reply The reply | ||
* @param value To what did we set a varialble (if we set any). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable
Addressed your comments :) thanks. Already looking better. |
{ | ||
setPath(path() + QString("/%1").arg(id)); | ||
setPath(path() + "/" + id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should use QLatin1Char('/')
here rather than just "/"
Nice PR. |
so the gui does not have to know abou the internal permissions
Fixes for old and new servers
Also some pointer cleanups
@dragotin no error handling still needs to be done. I plan to do that very simple for now (just like we had it before, show the status code in the footer). But now that we are properly abstracted away we can actually work on proper error handling and reporting in future PR's. |
For now pass it on to the gui. So at least they know something is wrong.
Ok now there is error reporting. Much in the same way it was before. So no improvements there yet. But it seems to be working again. |
Now the ShareTypes and Permissions are part of the Share class (which is a bit better abstracted away).
Now using QFlags to have better type checking in the code. They are less strict than enum classes but I think they fit better in the Qt coding way here. |
Please let me know if there are further comments. Else I'll merge somewhere tomorrow. |
Add share manager and the share objects
Step closer to #3737
Pretty big PR (I'm sorry... I'll promise to do better).
Basically this introduces the abstraction I want. And which should help significantly in making the user/group sharing easier to implement.
There is now a ShareManager, this is the entry point to do anything with shares. Be it creating, or fetching.
Then there is the Share class which represents a generic share and there is the LinkShare class. Since link shares are just like regular shares but slightly different :P. Share objects allow for interaction with the object. E.g. setting the password etc.
The sharedialog code is converted to use the new code and still works for me so far. And is a lot simpler.
TODO:
@guruz @dragotin @ckamm please have a look. More commits will follow. But since it kind of works now