1
0
Fork 0
Commit Graph

3052 Commits

Author SHA1 Message Date
Kevin Ottens 596bfab6e1
Set the account state after E2EE is setup in the GUI
Otherwise we would not display the E2EE message if the account was
connected before the creation of the settings dialog. This was likely
caused by the delayed creation of the settings dialog.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens f45e84f2ee
Remove empty action in the settings toolbar
This was causing an unwanted line in the middle of the bar.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens d63097475c
Fix typo and style
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens ce5edfdf4d
Stop using e2e()->isFolderEncrypted() in the folder wizard
We used the same approach than for the FolderStatusModel by getting the
is-encrypted property straight from the LSCOL job.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens 4fde05b8b6
FolderStatusModel now uses the LSCOL job result for encryption status
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens 8e5a8d9fb9
FolderStatusModel LSCOL job now gets the is-encrypted property
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens 37a51872e1
Set the encrypted flag in the database when EncryptFolderJob succeeds
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens b667bdda14
Change EncryptFolderJob path convention
It had a different path convention than all the other jobs, most likely
for legacy reasons because of the tight coupling it had to the settings
dialog.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Hannah von Reth dd3e70b667
VirtualFiles: Ensure the target location supports vfs
Fixes: #8131
2020-12-15 10:59:20 +01:00
Hannah von Reth 60011e8003
Remove vfs warning in the delegate, indicate them in the description instead
Fixes: #8139
2020-12-15 10:59:20 +01:00
Hannah von Reth 356192fb1d
Don't show 404 errors when manually creating folder sync pair.
Fixes: #7724
2020-12-15 10:59:20 +01:00
Hannah von Reth 1619cd5dcc
Use winvfs by default when adding folder sync connection
Fixes: #8083
2020-12-15 10:59:19 +01:00
Hannah von Reth 8460526df9
Clear cookies on logout 2020-12-15 10:59:19 +01:00
Hannah von Reth 020c6d6424
Fix placeholders are reverted to OnlineOnly
Fixes: #7779
2020-12-15 10:59:19 +01:00
Hannah von Reth f1f6257b5d
Windows VFS: Enable Windows VFS by default 2020-12-15 10:59:18 +01:00
Hannah von Reth bd62615aab
Clazy: Fix some warnigns 2020-12-15 10:59:17 +01:00
Hannah von Reth d109d49b49
Ui: Hide selective sync settings if vfs is active
Fixes: #7976
2020-12-15 10:59:17 +01:00
Hannah von Reth 54cc2be00f
Fix assertion introduced by e1ca612c5d3087e02f6b7f8e454224e0b88e82ad
[ fatal default ]:ASSERT: "last < rowCount(parent)" in file C:\_\17a9f6ae\qtbase-everywhere-src-5.12.9\src\corelib\itemmodels\qabstractitemmodel.cpp, line 2787

e1ca612c5d3087e02f6b7f8e454224e0b88e82ad stopped adding sub folders so we can return the actual size.
2020-12-15 10:59:17 +01:00
Hannah von Reth 93281c8560
Use const access where possible 2020-12-15 10:59:17 +01:00
Hannah von Reth 2887a93c40
Win: Use full Windows paths in file watcher and improve logging 2020-12-15 10:59:16 +01:00
Hannah von Reth b9638bc778
Fix warning
warning C4573: the usage of 'QObject::disconnect' requires the compiler to capture 'this' but the current default capture mode does not allow it
2020-12-15 10:59:15 +01:00
Hannah von Reth e38b43123c
Log: Only print 'Saved account settings' in debug mode
Don't log that there was no error...
2020-12-15 10:59:15 +01:00
Hannah von Reth c9ee0a0343
Log: Improve log message [ info gui.folder ]: Folder sync result: 4...
by including the name of the folder and print the name of the result
2020-12-15 10:59:15 +01:00
Hannah von Reth fb34f8ea85
Gui: Don't try to display the wizard during shutdown
Fixes: #7936
2020-12-15 10:59:14 +01:00
Hannah von Reth 4f8928d35e
Remove dead code 2020-12-15 10:59:14 +01:00
Hannah von Reth c5b59bf3b1
Make ownCloud accassible on the Application object 2020-12-15 10:59:14 +01:00
Hannah von Reth 4645e69147
Remove ifdef(Q_OS_X11) code, there never was such a define.
As noone complained since I don't think anyone will miss the code
2020-12-15 10:59:14 +01:00
Hannah von Reth f932dfc648
VFS: Tell the vfs plugin whether we have multiple accounts
This allows us to decide on the presentation of the account
2020-12-15 10:59:14 +01:00
Hannah von Reth 7fdb842ed2
VFS: Prevent duplicated navigation panel icon
Issue: #7748
2020-12-15 10:59:13 +01:00
Hannah von Reth c92f70d4ff
Beautify flags 2020-12-15 10:59:13 +01:00
Hannah von Reth 2b95f919ad
Fix 3aeca58b316363dc12ad4b392750fc57e7a2965a 2020-12-15 10:59:13 +01:00
Hannah von Reth 6d2526a67d
Fix warning C4715: 'OCC::Utility::vfsCurrentAvailabilityText': not all control paths return a value 2020-12-15 10:59:12 +01:00
Hannah von Reth b492b69dfd
Fix 150a5b4d06600d140ddf05383fb74cda6ae6e941 2020-12-15 10:59:12 +01:00
Hannah von Reth 6fde08d9f7
Fix crash on settings migration
Fixes: #7878
2020-12-15 10:59:12 +01:00
Hannah von Reth fa87b899fb
Fix usage of QMessageBox
Fixes: #7874
2020-12-15 10:59:12 +01:00
Hannah von Reth 11b9e3fa61
Fix order of pluginkit commands and modernise 2020-12-15 10:59:12 +01:00
Hannah von Reth eed4ffb823
Wizard: Raise own window
The OAuth authentication brings the broweser to the front, once thats done the wizard continues.
But the wizard ist now most probably hidden behind the browser
2020-12-15 10:59:11 +01:00
Hannah von Reth baff0a6986
VFS Dialog: Don't enable on close button clicked
Issue: #7710
2020-12-15 10:59:11 +01:00
Hannah von Reth b15c308170
Remvoe now unneeded SyncRunFileLog::directionToStr 2020-12-15 10:59:11 +01:00
Hannah von Reth 4681421b62
Remvoe now unneeded SyncRunFileLog::instructionToStr 2020-12-15 10:59:11 +01:00
Hannah von Reth 4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Hannah von Reth bcceb5c33d
[Gui] Implement raiseDialog on Windows
Issue: #7774
2020-12-15 10:59:09 +01:00
Hannah von Reth 12ae1e97c6
[SocketApi] Ensure listener still exists 2020-12-15 10:59:08 +01:00
Hannah von Reth d63d4cdf62
Don't insert items into the folder model if selectiveSync is not supported
This fixes an assertion in FolderStatusModel::SubFolderInfo::resetSubs
rowCount reported 0 but we actually had items in the model
2020-12-15 10:59:08 +01:00
Hannah von Reth 9176afe263
Make sure all cases are handled 2020-12-15 10:59:08 +01:00
Hannah von Reth 9b0788bdf8
[Gui] Fix vfs dialog not showing on Windows 2020-12-15 10:59:08 +01:00
Olivier Goffart b7193e6a0e
Folder Wizard: warn when adding a folder which is the parent of a sync'ed folder
issue #7741
2020-12-15 10:59:07 +01:00
Hannah von Reth 13c9d6431d
Fix expansion of tree view on newly added accounts
The change is based on 97ce20ac028660e6ae3dd0b98d4b487999d8768a

I removed a few lines of code there which are already part of fetchMore()

Fixes: #7336
2020-12-15 10:59:07 +01:00
Hannah von Reth fdc3b7c8da
[Wizard] Make vfs dialog blocking
Calling the callback after the receiver was deleted caused a crash
Fixes: #7709
Fixes: #7711
2020-12-15 10:59:07 +01:00
Hannah von Reth ba87fc9e78
[SSL] Properly restore user accepted certificats 2020-12-15 10:59:06 +01:00
Hannah von Reth c8dd333e31
[Sanity] Remove old ifdef 2020-12-15 10:59:06 +01:00
Hannah von Reth 9564e5e92e
Fix saving of cookies
Fixes: #7700
2020-12-15 10:59:06 +01:00
Hannah von Reth 3a3ccb0834
Don't hardcode PLUGINDIR 2020-12-15 10:59:06 +01:00
Olivier Goffart f81f96915f
ProxyAuthHandler Use QPointer instead of QWeakPointer
QWeakPointer::data is deprecated.
In this case we should use QPointer
2020-12-15 10:59:05 +01:00
Hannah von Reth edb51abdfd
Don't ignore file sync notification after an unlock
For a usual file sync event we check for actual changes in the local file,
after an unlock the local file might be unchanged so we need to sync it anyhow.

Fixes: owncloud/enterprise#3609
2020-12-15 10:59:05 +01:00
Hannah von Reth 3317e354f2
Prepend PLUGINDIR else its pointless 2020-12-15 10:59:05 +01:00
Hannah von Reth dabf7aaebc
Application: Allow to quit running instances by commandline 2020-12-15 10:59:04 +01:00
Hannah von Reth fa82a4aff3
Cleanup 2020-12-15 10:59:04 +01:00
Olivier Goffart 4424eb7f07
AccountSettings: limit the clickable region of the 'add folder' button
Issue #7326
2020-12-15 10:59:03 +01:00
Olivier Goffart b97c0ed8a2
Network Settings: Show a warning that proxy settings do not apply to localhost
Only show this if at least one account is detected to have an url that looks
like localhost, because this could otherwise be confusing

Issue #7169
2020-12-15 10:59:03 +01:00
Hannah von Reth 9807285abd
[Gui] Set proper hdpi attributes 2020-12-15 10:59:03 +01:00
Olivier Goffart 513b0c723c
Account Settings: change the color of info message from green to blue
To avoid confusion with the color of "success"

Issue #7403
2020-12-15 10:59:02 +01:00
Olivier Goffart 4d7ed8f62c
Wizard: fix compilation warnings about unused variables 2020-12-15 10:59:01 +01:00
Hannah von Reth dc55617144
Ensure the url is complete before we validate it
Fixes: #6722
2020-12-15 10:59:00 +01:00
Christian Kamm a5c6612883
ConnectionValidator: increase timeout to 57s #7456
When the gui thread blocks for several seconds it's possible for the
ConnectionValidator to timeout and decide that the account is
unreachable. It will then terminate all sync runs.

Increasing the timeout makes this less likely to happen. The tradeoff is
that real disconnects will not be detected as quickly.

This does not address the root cause but makes the symptom less likely
to appear.
2020-12-15 10:58:59 +01:00
Hannah von Reth f78c4f851b
Change Windows virtual files description to tech preview 2020-12-15 10:58:57 +01:00
Hannah von Reth afc9cd2f46
OwncloudWizard: Mark vfs as tech preview instead of experimental 2020-12-15 10:58:57 +01:00
Dominik Schmidt 7e4d24de2b
SocketApi: Avoid unneccessary conversions 2020-12-15 10:58:57 +01:00
Dominik Schmidt 06ac1c33e8
SocketApi: cleanup debug output 2020-12-15 10:58:57 +01:00
Dominik Schmidt 25cd52dd9f
Add ASYNC_ASSERT_ICON_IS_EQUAL command to SocketApi 2020-12-15 10:58:57 +01:00
Dominik Schmidt d1f9b1a4f8
Make findWidget more powerful 2020-12-15 10:58:56 +01:00
Dominik Schmidt 67656fb136
Add Q_PROPERTYs for gui testing 2020-12-15 10:58:56 +01:00
Dominik Schmidt 596154a01a
Switch GUI Testing SocketApi to Utf8 2020-12-15 10:58:56 +01:00
Dominik Schmidt 3288a36da6
Add GUI testing SocketApi extension 2020-12-15 10:58:56 +01:00
Hannah von Reth 0f92713ce5
AccountSettings: Use switch, case to ensure we handle all cases 2020-12-15 10:58:55 +01:00
Christian Kamm a587cd3a13
AccountSettings: Fetch subitems after wiping them
That helps avoid empty lists after account creation #7336
2020-12-15 10:58:54 +01:00
Christian Kamm 38c466efbf
Vfs: Require local discovery after disabling vfs
Without it local files aren't guaranteed to be downloaded #6936.
2020-12-15 10:58:54 +01:00
Christian Kamm b34df4413b
Vfs: Improve strings for availability states 2020-12-15 10:58:53 +01:00
Christian Kamm fc52c5d0cd
Vfs: Retain existing data when enabling vfs #7302
Previously all local data was deleted because the root folder was marked
as OnlineOnly.
2020-12-15 10:58:53 +01:00
Christian Kamm 5acb157a7e
VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.

To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.

This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
2020-12-15 10:58:52 +01:00
Markus Goetz 62d876b09a
OAuth2: Better error logging
This does not fix a bug, just was found while spotting a bug that was no bug.
For https://github.com/owncloud/enterprise/issues/2951
2020-12-15 10:58:51 +01:00
Olivier Goffart 2c975b1e70
SocketAPI: Fix string claiming a folder is a file
Issue #7206
2020-12-15 10:58:51 +01:00
Markus Goetz 46c336503a
Log Window: Create and open folder properly #7166 2020-12-15 10:58:50 +01:00
Christian Kamm edad7ce7d7
Vfs: Mark sqlite temporaries excluded on db-open #7141
The previous patch ensured that the sqlite temporaries weren't deleted
and recreated for every sync run, but there was still time between
client startup and the first sync run where they would have the
"needs-sync" icon.
2020-12-15 10:58:50 +01:00
Christian Kamm 7774b8049e
Vfs: Distinguish availability error kinds #7143
Previously "no-availability" meant db-error and querying the
availability of a nonexistant path returned AllHydrated.

Now, the availability has a DbError and a NoSuchItem error case.
2020-12-15 10:58:49 +01:00
Christian Kamm 1e5ae77994
Fix logic for duration that an etag reply indicates connectivity
This got inverted accidentally when std::chrono was introduced.

For #7160
2020-12-15 10:58:49 +01:00
Christian Kamm 7f3f13fd97
Vfs: "free space" only shows when it has an effect #7143
To do this, introduce AllDehydrated availability and rename
SomeDehydrated to Mixed - it now guarantees there are also hydrated
items.
2020-12-15 10:58:49 +01:00
Christian Kamm 40d9fc4f4b
Vfs: Adjust and centralise action text #7143
Saying "Currently available locally" sounds more like an indicator than
"Availably locally" does. Centralizing translations avoids consistency
issues between shell context menus and sync folder context menu.
2020-12-15 10:58:49 +01:00
Christian Kamm 021f994584
FolderWizard: Don't crash when typing invalid drive #7041
When the user typed "x:" where the drive x didn't exist, the validation
function would loop forever. Now it shows a "path doesn't exist" error.
2020-12-15 10:58:49 +01:00
Christian Kamm 076e24f465
Log: Start logging immediately when "permanent logs" enabled #7146
Previously one would need to wait for the next sync run to create the
first log file.
2020-12-15 10:58:48 +01:00
Christian Kamm 772a210cc9
Mention selective sync when switching on vfs 2020-12-15 10:58:48 +01:00
Christian Kamm 22234e0e73
LogWindow: Remove output, add "go to log folder" button #6475 2020-12-15 10:58:47 +01:00
Christian Kamm dcf34316fd
Vfs: Add 'availability', a simplified, user-facing pin state #7111
The idea is that the user's question is "is this folder's data available
offline?" and not "does this folder have AlwaysLocal pin state?".
The the answers to the two questions can differ: an always-local
folder can have subitems that are not always-local and are dehydrated.

The new availability enum intends to describe the answer to the user's
actual question and can be derived from pin states. If pin states aren't
stored in the database the way of calculating availability will depend
on the vfs plugin.
2020-12-15 10:58:47 +01:00
Christian Kamm 590db28541
Vfs: Clear up relationship between _type and pin state
The pin state is a per-item attribute that has an effect on _type:
AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly
hydrated files will be marked for dehydration.

Where exactly this effect materializes depends on how the pin states are
stored. If they're stored in the db (suffix) the dbEntry._type is
changed during the discovery.

If the pin state is stored in the filesystem, the localEntry._type must
be adjusted by the plugin's stat callback.

This patch makes pin states behave more consistently between plugins.
Previously with suffix-vfs pin states only had an effect on new remote
files. Now the effect of pinning or unpinning files or directories is as
documented and similar to other plugins.
2020-12-15 10:58:46 +01:00
Christian Kamm 3f55f9302e
Vfs: Hydrating a virtual is SYNC not NEW #7101
Previously it'd be NEW(ItemTypeFile), but now it has changed to be
SYNC(ItemTypeVirtualFileDownload) which allows better classification.
2020-12-15 10:58:45 +01:00
Christian Kamm e0c8acc195
Notifications: Don't say "downloaded" for new files #7101
These files may very well just be new virtual files that were explicitly
*not* downloaded.
2020-12-15 10:58:45 +01:00
Christian Kamm 04e0e22513
Protocol, Notifications: Show destination() instead of _file
destination() now consistently points to the file after the successful
sync operation. _file might be the place the item was moved from.
2020-12-15 10:58:45 +01:00
Markus Goetz 5da48a5239
SocketApi: Fix owncloud/enterprise#2938 2020-12-15 10:58:43 +01:00
Christian Kamm 2f7cdb81cf
Tray: Try to establish tray after 10s if failed initially #6518
When owncloud is started during desktop startup the tray may not yet
be running when the client starts. This will make the client attempt
to create a tray icon again after 10 seconds if there's no tray
during initial startup.
2020-12-15 10:58:43 +01:00
Christian Kamm ee6a48b3dc
Client certs: Store pkcs12 in config, password in keychain
It still reads and writes the old format too, but all newly stored
client certs will be in the new form.

For #6776 because Windows limits credential data to 512 bytes in older
versions.
2020-12-15 10:58:43 +01:00