Now that we adjusted our protocol to follow the slightly updated server
API, let's make sure we don't try to talk to a server with an older API.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Previously we were using QCursor::pos() in the Linux case, which is a
fair heuristic except it will always be relative to the primary screen
and not the current screen. This explains why we had to adjust with the
virtual geometry.
In the Windows and Mac case we got the position out of QSystemTrayIcon
and that one was already relative to the current screen.
So now we use QCursor::pos(currentScreen()) which ensures we give the
coordinates relatively to the current screen also in the Linux case.
Since all platforms are now having that point in the same coordinate
system we don't need to mess around with the virtual geometry to
compensate.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Turns out that when we added a new e2e folder during sync, we were
passing the wrong path to the e2e object. We have several path
convention in the sync code, just happened to be the wrong one.
I still long for the day when we'll use the type system to deal with
paths. All those strings are error-prone.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Other clients seem to allow creating empty encrypted folders with no
metadata associated to them, so let's get ready to handle it. In case of
a 404 to get the metadata, we create an empty metadata payload and pass
it further down.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
It used to be a base64 encoded '|', now it is still a '|' but not
encoded, let's adjust accordingly.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
We need to finish deleting the file before we can actually unlock. Also
the token will be necessary for the delete to succeed.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
The headers() method is used to pass extra headers to the PUT jobs for
instance, definitely needed for uploads now.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
- The default displayed was not in sync with the server because
the client was setting permissions when creating a share while it
should get the default permissions from the server to display it to the
user first.
Signed-off-by: Camila <hello@camila.codes>
This is in line with other bools of that struct and gets rid
of clang-tidy's modernize-use-default-member-init warning.
(The trivial alternative to get rid of that warning would be
to use default member init for that bool variable, but I think
it is better to have it as a bitfield.)
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The value gets already initialized by default member initialization,
so there is no need to set it again in the constructor.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The value gets already initialized by default member initialization,
so there is no need to set it again.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The value gets already initialized by default member initialization,
so there is no need to set it again in the copy constructor.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>