Commit Graph

170 Commits

Author SHA1 Message Date
Markus Goetz
569051ed73 SocketApi: Fix owncloud/enterprise#2938 2019-03-14 19:13:31 +01:00
Christian Kamm
db866afb60 Merge remote-tracking branch 'origin/2.5' 2019-03-14 08:34:19 +01:00
Christian Kamm
f3ab584304 Shares: "copy link" action can create shares with expiry #7061
Previously it gave up if "expiry required" was enabled. Now it'll create
a link share per day with the default expiry for these setups.
2019-03-07 10:16:07 +01:00
Christian Kamm
221b8680e4 Merge remote-tracking branch 'origin/2.5' 2019-03-04 09:36:29 +01:00
Christian Kamm
95e7720864 Vfs: Fix folder dehydration requests on OSX #6977
Since the rename is triggered by the client process the folder watcher
didn't pick up on it on OSX.

This does not need to be merged into master.
2019-02-28 07:31:23 +01:00
Christian Kamm
3f429da050 SocketApi: Fix crash with readyRead() after disconnected() #7044
With the recent bugfix to avoid sending messages on dead connections
0bfe7ac250
the client now crashed if readyRead() was received after disconnected()
for the socket as the listener for that connection was already removed.

This code fixes it by still invoking the handler from readyRead() but
passing a SocketListener that won't attempt to send messages.
2019-02-19 07:55:12 +01:00
Christian Kamm
f311cc2ffb Vfs: Add option to hide socketapi pin actions
Because some plugins provide alternative ui.
2019-02-11 13:35:14 +01:00
Christian Kamm
210f309e6e PinStates cleanup
- SyncJournalDB functions now behind internalPinStates() to avoid
accidental usage, when nearly everyone should go through Vfs.
- Rename Vfs::getPinState() to Vfs::pinState()
2019-02-11 13:35:14 +01:00
Christian Kamm
010abe4c82 Pin state updates
- unspecified and inherited are different
- move enum to header in common/
- access through Vfs instead of directly in Journal
2019-02-11 13:35:14 +01:00
Olivier Goffart
597acba274 Merge remote-tracking branch 'origin/2.5'
Conflicts:
	VERSION.cmake
	src/common/syncjournaldb.cpp
	src/libsync/propagatedownload.cpp
2019-02-08 12:48:31 +01:00
Christian Kamm
f0fb15fecb vfs: Update pinning context menu to be less confusing
Seeing "Currently available online only" for a currently hydrated file
was odd. It makes sense since current hydration status and pin state are
independent.

The new text will say something like "Currently available, but marked
online only" to better indicate that the file might be dehydrated later
since it wasn't pinned.
2019-01-18 11:16:43 +01:00
Christian Kamm
0bfe7ac250 SocketAPI: Remove listener immediately on lost connection
To avoid situations where messages are attempted to be sent to dead
connections.
2019-01-17 11:13:24 +01:00
Christian Kamm
0dd48d3a06 SocketAPI: Overhaul ui for 'available locally' vs 'online only'
For #6815
2019-01-07 10:15:37 +01:00
Christian Kamm
4e2546d476 vfs: SocketAPI actions adjust pin state of directories #6815
Downloading a folder also sets its pin state; releasing a folder sets
its pin state.
2018-12-19 14:04:24 +01:00
Olivier Goffart
11c73ae45b SocketApi: make sure to discover the file we want to make virtual
MacOSX's file system watcher does not deliver events for files modified by
our own process.

Issue: #6844
2018-12-17 12:37:11 +01:00
Olivier Goffart
9fbef38247 Merge remote-tracking branch 'owncloud/vfs-master'
Conflicts:
	src/libsync/filesystem.cpp
	src/libsync/filesystem.h
2018-12-07 10:04:43 +01:00
Olivier Goffart
c3277331eb Merge branch 'readonly-restore-context-6252' into 'master'
Conflicts:
	src/gui/socketapi.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.cpp
2018-12-03 14:18:35 +01:00
Christian Kamm
18ab3f5dcd vfs: Separate vfs availability from new-files-virtual
This helps support 2.5 settings where there are virtual files in the
tree but new files aren't created virtual.

It's also a prelude for #6815

There's currently no way of
- upgrading vfs plugins (a silent suffix->winvfs upgrade is attempted
  once only, when moving to master)
- disabling vfs capabilities outright
2018-11-26 13:02:48 +01:00
Christian Kamm
572775a382 vfs: Ensure local discovery is done on dehydration request 2018-11-26 13:02:48 +01:00
Christian Kamm
06928a4037 winvfs: initial work
Done by ckamm and dschmidt
2018-11-26 12:53:30 +01:00
Christian Kamm
9b7da91f6d Private links: improve legacy fileid derivation #6745 2018-08-31 18:10:01 +02:00
Olivier Goffart
61452de83d Socket API: add an option to replace existing files with virtual files
Issue #6726
2018-08-30 17:59:02 +02:00
Olivier Goffart
1753ce651b Virtual Files: Allow to download a folder recursively from the socket API
Issue: #6466
2018-05-30 11:57:57 +02:00
Olivier Goffart
d7792dc951 Rename SocketApi::FileData::accountRelativePath to serverRelativePath
As discussed in issue #6552
2018-05-30 10:51:44 +02:00
Olivier Goffart
1434fa5139 Share dialog: use the original name and not the virtual file name
When sharing a virtual file, we should actually use the original file name
not the virtual file name

Issue: #6461
2018-05-30 10:51:17 +02:00
Christian Kamm
8cfc16c16c SocketAPI: Introduce conflict resolution actions #6252
For conflicts generally as well as new files in read-only directories
the context menu will now present delete and move options.
2018-05-23 11:02:00 +02:00
Christian Kamm
8f9f2b5462 Rename Placeholders to Virtual Files in code #6531 2018-05-23 09:57:00 +02:00
Christian Kamm
1508b562ad SocketAPI: Allow opening share dialog if contents still syncing #4608
With the previous changes the "Share..." action was shown but it didn't
work yet.
2018-04-23 12:24:32 +02:00
Christian Kamm
4390bbf838 SocketAPI: Remove SHARE_STATUS
It was never used by a shell integration.
2018-04-23 12:24:32 +02:00
Christian Kamm
9e8464e114 Merge branch 'placeholder-prototype' 2018-04-18 11:02:53 +02:00
Christian Kamm
70b4dc99dc NSIS: Register placeholder extension
Also change the placeholder suffix config option to not include the dot,
the dotless form is needed in the nsis script.
2018-04-18 10:27:51 +02:00
Christian Kamm
8358dabbfd Folder: Simplify relative path computation
It was done manually in several places after folderForPath() calls.
2018-04-18 10:27:51 +02:00
Christian Kamm
8b6ae04155 Placeholders: Download from shell integration 2018-04-18 10:27:51 +02:00
Christian Kamm
57044c1e02 Silence warning by removing unnecessary this capture 2018-04-18 10:26:22 +02:00
Christian Kamm
93d8810414 SocketApi/Sharing: Add "copy public link" to menu #6356
* The new menu option will fetch shares and create a new link share if
  no "context menu share" currently exists.
* Various cleanup of common operations in socketapi happened as well,
  in particular there's now FileData::get() that calculates all the
  relevant paths that are useful for most socketapi actions.
2018-04-16 08:37:44 +02:00
Markus Goetz
aceff1f863 macOS: Implement new dynamic Finder menu items #6328 2018-04-12 13:12:42 +02:00
Markus Goetz
894686e66a macOS: Unload the Finder extension on exit #5382 #3819 2018-04-11 13:37:34 +02:00
Olivier Goffart
e322bd706f SocketAPI: "Open in browser" and disable Share entries when sharing is disabled.
This adds "Open in browser" entry in the menu (Issue #5903)

Also mark the entries as disabled when the file is not yet on the server.
If re-sharing is not allowed for that file, a disabled explaination
entry is added to the menu.
If sharing is disabled globaly in the branding or in the server,
the share entry will not be present.
(Issues #4205 and #4608)

Meta issue #6292
2018-01-26 09:19:26 +01:00
Olivier Goffart
982c591ec9 SocketApi: add a way to disable menu entries 2018-01-23 14:02:56 +01:00
Olivier Goffart
1782ae3c08 SocketAPI: Make it easier to add or remove item in the action menu
By making it dynamic.
So far only the dolphin shell extension have been ported
2018-01-23 14:02:56 +01:00
Olivier Goffart
776bbbf7b1 Don't include sqlite3.h from headers
So that sqlite is not part of the public interface of csync
(and that the sqlite include path don't need to be passed when compiling
libsync or gui)
2018-01-13 13:58:17 +01:00
Olivier Goffart
8c652e061d Remove uses of deprecated QString::fromAscii 2017-12-08 16:15:48 +01:00
Olivier Goffart
3df65460f5 Remove usage of QString::null
Replaces by "QString()"
2017-12-08 16:15:22 +01:00
Christian Kamm
d949ec6877 Protocol: Introduce context menu with "open in browser" #6121
To do this conveniently a bunch of functionality that's common to
IssueWidget and ProtocolWidget is moved to ProtocolItem.

Also the convenience function to asynchronously retrieve the private
link url is moved from the socket api to the network jobs.
2017-11-21 12:42:10 +01:00
Christian Kamm
18091f99d4 Private links: Retrieve numeric file id property #6146
Some servers have non-compliant instance ids (that start with a number)
and thereby make deducing the numeric file id from the full id
unreliable.

To circumvent this problem we retrieve the fileid property from the
server with a PROPFIND.
2017-11-14 12:14:11 +01:00
Jocelyn Turcotte
6f46764daa SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-09-26 11:03:23 +02:00
Markus Goetz
81d9f94a29 macOS: Fix compile 2017-09-23 13:42:39 +02:00
Olivier Goffart
ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Christian Kamm
dca2664707 Private links: Retrieve link through propfind property #6020
* The sharing ui does a propfind anyway: use that to query the new
property as well!
* For the socket api, asynchronously query the server for the right url
when an action that needs it is triggered.

The old, manually generated URL will be used as fallback in case the
server doesn't support the new property or the property can't be
retrieved for some reason.

Depends on owncloud/core#29021
2017-09-19 10:51:03 +02:00
Jocelyn Turcotte
a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00