1
0
Fork 0
Commit Graph

3188 Commits

Author SHA1 Message Date
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
Christian Kamm cc840534c0
Add PLUGINDIR cmake setting and define #7027
By default, plugins are only searched next to the binary or next to the
other Qt plugins. This optional build variable allows another path to be
configured.

The idea is that on linux the oC packaging probably wants the binary in
something like /opt/owncloud/bin and the plugins in
/opt/owncloud/lib/plugins.

Similarly, distribution packagers probably don't want the plugins next
to the binary or next to the other Qt plugins. This flag allows them to
configure another path that the executable will look in.
2020-12-15 10:58:43 +01:00
Olivier Goffart 87bd26bf6c
AccountManager: load the cookies
For issue #7054
2020-12-15 10:58:43 +01:00
Christian Kamm a72bf89779
Selective sync: Don't collapse tree when entering mode #7055
doExpand() is called when the selective sync editing mode is enabled in
the folder settings view. Previously it'd set the expansion to be
exactly the root items. Now, it just expands any root items that are
currently collapsed, leaving all other item expansion unchanged.
2020-12-15 10:58:42 +01:00
Christian Kamm 2e11f14a6b
SocketApi: Fix crash with readyRead() after disconnected() #7044
With the recent bugfix to avoid sending messages on dead connections
0bfe7ac250c54f5415c0a794c7b271428e83c3cf
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.
2020-12-15 10:58:42 +01:00
Christian Kamm 6199e140a5
Wizard: Avoid cert dialog multiple connection
This could lead to odd behavior when slotCertificateAccepted
was called multiple times.
2020-12-15 10:58:42 +01:00
Christian Kamm 83268c255a
Folder wizard: Fix infinite loop for bad paths #7041 2020-12-15 10:58:42 +01:00
Christian Kamm 238ac53666
Ensure local discovery on selective sync changes
As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.

Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.
2020-12-15 10:58:41 +01:00
Christian Kamm 4c04351360
Fix warnings about signedness
Sizes are always qint64, not unsigned.
TransferIds are always uint.
2020-12-15 10:58:41 +01:00
Christian Kamm e9cbe13598
Vfs: Add option to hide socketapi pin actions
Because some plugins provide alternative ui.
2020-12-15 10:58:40 +01:00
Christian Kamm d8873c18a1
File watcher: Pin state attribute changes are valid notifications
Previously they would be discarded since the file's mtime or size hadn't
changed.
2020-12-15 10:58:39 +01:00
Christian Kamm 83a818678f
PinStates cleanup
- SyncJournalDB functions now behind internalPinStates() to avoid
accidental usage, when nearly everyone should go through Vfs.
- Rename Vfs::getPinState() to Vfs::pinState()
2020-12-15 10:58:39 +01:00
Christian Kamm 0eb4065197
Folder: Add remoteFolderTrailingSlash()
There were cases where the "/" exception wasn't handled correctly
and there'd be extra slashes in generated paths.
2020-12-15 10:58:39 +01:00
Christian Kamm 41f1ddb5fc
Vfs: Call unregisterFolder() when folder is removed 2020-12-15 10:58:39 +01:00
Christian Kamm 7f400e3226
Pin state updates
- unspecified and inherited are different
- move enum to header in common/
- access through Vfs instead of directly in Journal
2020-12-15 10:58:38 +01:00
Christian Kamm e2eea24a03
Vfs: Send SyncFileStatusTracker data to vfs plugins 2020-12-15 10:58:37 +01:00
Christian Kamm fe27804afb
Move SyncFileStatus to libcommon
It'll be needed in vfs plugins so they can connect to the data coming
out of SyncFileStatusTracker.
2020-12-15 10:58:37 +01:00
Christian Kamm 848b869cdf
SocketAPI: Remove listener immediately on lost connection
To avoid situations where messages are attempted to be sent to dead
connections.
2020-12-15 10:58:36 +01:00
Christian Kamm 0eebd77d2c
SocketAPI OSX: Forbid further sends on connectionDidDie
Also release the remote end immediately.
2020-12-15 10:58:36 +01:00
Christian Kamm f3be99e5b2
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.
2020-12-15 10:58:35 +01:00
Christian Kamm b7079289c2
Vfs: Switch on/off only when sync isn't running #6936
Avoids some situations that might cause data loss.
2020-12-15 10:58:34 +01:00
Christian Kamm 5728256763
Folder: Add selective sync / ui related flags
supportsSelectiveSync(): clearer than !supportsVirtualFiles() and allows
  extra logic

isVfsOnOffSwitchPending(): Somewhat awkward way of dealing with the
  phase between a user requesting vfs state to be switched and it
  actually happening
2020-12-15 10:58:34 +01:00
Christian Kamm 22255e4976
vfs: Add vfs migration options to folder context menu
This allows enabling and disabling vfs.

To distinguish this operation from setting the root pin state, the
availability setting is adjusted as well to be similar to the
menu that shows in the shell extensions.
2020-12-15 10:58:33 +01:00
Christian Kamm 3b923e2afe
vfs: Change per-folder message on vfs support
I'm unsure this note is all that useful. Remove entirely?
2020-12-15 10:58:33 +01:00
Christian Kamm 4df101ed84
vfs: Allow (de-)hydrating the full sync folder 2020-12-15 10:58:33 +01:00
Christian Kamm 47e21bfc60
vfs: Don't assume suffix mode for old folders
That would break with old folders that use selective sync.
2020-12-15 10:58:33 +01:00
Christian Kamm cbb32edee2
vfs: Disable selective sync if vfs support is available 2020-12-15 10:58:32 +01:00
Christian Kamm aa23058d76
Wizard: Ensure client cert doesn't get lost #6911 2020-12-15 10:58:32 +01:00
Christian Kamm c470825c8f
Wizard: Drop unused function 2020-12-15 10:58:32 +01:00
Markus Goetz 4fcad0d8b0
Sync: Display theme in debug log 2020-12-15 10:58:32 +01:00
Olivier Goffart c31d3f277f
HttpCredentials: Do not re-enter the event loop
https://sentry.io/owncloud/desktop-win-and-mac/issues/777907931/
mention a crash in OCC::HttpCredentialsGui::showDialog
One possible explaination is that this is caused by re-entring the event loop.
So don't do that.
2020-12-15 10:58:31 +01:00
Olivier Goffart 0e56dfe3a4
Gui: do not show the settings when opening a virtual file
Issue #6764
2020-12-15 10:58:31 +01:00
Christian Kamm c4dfa82661
SocketAPI: Overhaul ui for 'available locally' vs 'online only'
For #6815
2020-12-15 10:58:30 +01:00
Christian Kamm d956f518a8
vfs: Remove newFilesAreVirtual - use root PinState instead
This unifies how to deal with pin states.

Also enable reading a folders direct pin state vs its effective pin
state.
2020-12-15 10:58:30 +01:00
Christian Kamm cdf61b9e82
vfs: Show "new files are virtual" option only with vfs
If there's no vfs possibility, showing it makes little sense.
2020-12-15 10:58:30 +01:00
Christian Kamm 8f895fc83c
vfs: SocketAPI actions adjust pin state of directories #6815
Downloading a folder also sets its pin state; releasing a folder sets
its pin state.
2020-12-15 10:58:29 +01:00
Christian Kamm 69144566ce
Database: Change path for new dbs to .sync_* #5904
This is to avoid issues on OSX, where the ._ prefix has special meaning.

Originally (before 2.3.2) ._ was necessary to guarantee exclusion. But
since then the .sync_ prefix is excluded as well.

This does not affect existing database files.
2020-12-15 10:58:28 +01:00
Christian Kamm 75b9976526
Vfs: Ensure older versions gracefully ignore winvfs folders
Previously there'd likely be a mess if a 2.6 winvfs folder was attempted
to be used with a 2.5 client. Now the older clients will ignore these
folders.
2020-12-15 10:58:28 +01:00
Olivier Goffart feb770eca7
Allow to open log window via command line to already running client
Issue: #4098
2020-12-15 10:58:27 +01:00
Christian Kamm 305d439c41
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
2020-12-15 10:58:27 +01:00
Christian Kamm cc912f4d02
vfs: ensure backwards-compatible settings value is always set 2020-12-15 10:58:26 +01:00
Christian Kamm b30f79edf6
vfs: Ensure SyncOptions::_vfs is never null
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
2020-12-15 10:58:26 +01:00
Christian Kamm d7ad7854c1
vfs: Ensure local discovery is done on dehydration request 2020-12-15 10:58:26 +01:00
Christian Kamm f2b78b5efb
Folder settings: Keep "usePlaceholders" to be backwards compatible 2020-12-15 10:58:25 +01:00
Christian Kamm fa2450cf11
vfs: Be more careful about Vfs instance ownership 2020-12-15 10:58:25 +01:00
Christian Kamm 9ced8dd836
vfs: Improve modeFromString() signature 2020-12-15 10:58:24 +01:00
Christian Kamm 85dd10eb9b
vfs: Fix dealing with missing vfs instance
Maybe there should just be a VfsOff instance to make this less error
prone.
2020-12-15 10:58:24 +01:00
Christian Kamm 4bef96afe7
vfs: Make switching vfs on/off work again 2020-12-15 10:58:23 +01:00
Christian Kamm fa6f3cd847
vfs: Fix plugin decision in wizards, sanitize loading 2020-12-15 10:58:23 +01:00
Christian Kamm e0ae6012b1
vfs: Allow folders without vfs 2020-12-15 10:58:22 +01:00
Christian Kamm 2b20985875
winvfs: initial work
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Christian Kamm c3b1a872aa
FolderMan: Remove assumption of unique running sync 2020-12-15 10:58:21 +01:00
Olivier Goffart a6614c18f1
IgnoreListEditor: increase a bit the size
Should Help for issue #6641
2020-12-15 10:58:21 +01:00
Christian Kamm 6b0bb66b17
LockWatcher: Add chrono header 2020-12-15 10:58:20 +01:00
Christian Kamm 0d49056a13
Add Ctrl-L as log window shortcut
F12 is taken on OSX and there's no other way of showing it.
2020-12-15 10:58:17 +01:00
Christian Kamm 9d55590d10
Test: Add test for locked file tracking and propagation 2020-12-15 10:58:17 +01:00
Christian Kamm da178c1352
Folder: Treat file unlock similar to external change #6822
For consistent handling of incoming notifications.
2020-12-15 10:58:17 +01:00
Olivier Goffart 60b17cd128
Folder: update the folder version
Since the new index would crash old version of the client, we need to
upgrade folder version so they do not load in the client 2.5.0
2020-12-15 10:58:15 +01:00
Christian Kamm 7de453d439
Settings: Make FoldersWithPlaceholders group sticky
If virtual files are disabled on a folder it might still have db entries
or local virtual files that would confuse older client versions.
2020-12-15 10:58:15 +01:00
Olivier Goffart ec8c02dad0
Sharing: add the `shareWithAdditionalInfo` string in autocompletion results
Issue #6749
2020-12-15 10:58:15 +01:00
Olivier Goffart 380d7b8028
Migration from 2.4: fallback to move file by file if directory move failled (#6807)
Migration from 2.4: fallback to move file by file if directory move failed

This can happen if the directory already exist because, say, it was
created by the ownCloud outlook plugin which save its file in the same directory
2020-12-15 10:58:15 +01:00
Olivier Goffart dcfbde2a67
Wizard: Reset the QSslConfiguration before checking the server
Because a previous call with another demain might have set some
config for another server.

Issue #6832
2020-12-15 10:58:14 +01:00
Dominik Schmidt 5d9370594d
Disable autostartCheckBox if autostart is configured system wide 2020-12-15 10:58:14 +01:00
Olivier Goffart 8490664860
Account Settings: fix progress being written in white when there are errors 2020-12-15 10:58:12 +01:00
Christian Kamm dd34cbc751
Virtual files: Wipe selective sync settings when enabled 2020-12-15 10:58:12 +01:00
Christian Kamm 60de1c9720
virtual files: show option only when branding allows it 2020-12-15 10:58:12 +01:00
Christian Kamm 251e01a440
Virtual files: Use theme to check for option availability 2020-12-15 10:58:12 +01:00
Olivier Goffart 94e63ef7b9
Account Settings: Add a context menu entry to enable or disable virtual files
Issue #6725
2020-12-15 10:58:12 +01:00
Olivier Goffart 15eab07866
OAuth2: Store 'Account::davUser' in the config, and use that user for connecting
We need to use the user id to check if we are connected to the right account.
These might be different from the HTTP Basic Auth login. (LDAP setups)

When the account was configured as an oauth2 account form the wisard, the
http_user was already set correctly to the user id. But when the server is
upgrading from basic auth to oauth2, we need to pick the right login.

Note that Account::davUser() already defaults to the HTTP user when none
is set, so this means the upgrade will be fine if this is not set in the
config.

Issues:
https://github.com/owncloud/oauth2/issues/109
https://github.com/owncloud/enterprise/issues/2781
2020-12-15 10:58:11 +01:00
Olivier Goffart b86e1efc9a
Remove the backup deteciton code which was used for server < 9.1 2020-12-15 10:58:10 +01:00
Olivier Goffart afed46afcc
New discovery algorithm: Parallel PROPFIND 2020-12-15 10:58:08 +01:00
Olivier Goffart 3289675b8d
Folder Wizard: Disable the 'choose what to sync' treeview if virtual files are selected
Don't allow to configure virtual files with a selective sync blacklist
2020-12-15 10:58:07 +01:00
Olivier Goffart d8fa8e270f
AccountSetting: Fix Small Memoy leak 2020-12-15 10:58:06 +01:00
Olivier Goffart 0ba9dc7dd1
AccountSettings: Force sync should wipe the blacklist
Issue #6757
2020-12-15 10:58:06 +01:00
Olivier Goffart 75a57778d9
Virtual files: Don't show selective sync
Issue #6724
2020-12-15 10:58:06 +01:00
Olivier Goffart 46aa8fd1f8
Socket API: add an option to replace existing files with virtual files
Issue #6726
2020-12-15 10:58:06 +01:00
Olivier Goffart afc953b649
Update the minimum supported version
We want to warn if the server version is not supported and did not get
appropriate QA for this client version.

https://github.com/owncloud/enterprise/issues/2687
2020-12-15 10:58:05 +01:00
Olivier Goffart 358aadfb98
Account Settings: Add a text for folder using vierual files
Issue #6723
2020-12-15 10:58:04 +01:00
Olivier Goffart a17a2a9c06
Virtual Files Mime Type: use "vnd." prefix instead of "x-"
As reported in https://github.com/owncloud/client/issues/6717#issuecomment-413703567
2020-12-15 10:58:03 +01:00
Olivier Goffart 4837bc8d60
FolderStatusModel: Do not abort applying selective sync if one folder has an error
Issue #6675
2020-12-15 10:58:03 +01:00
Olivier Goffart ca32eb1cf7
More cleanup of csync remains 2020-12-15 10:58:01 +01:00
Dominik Schmidt aad928a6be
Install libocsync to lib/ without subfolder.
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.

The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.

It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
2020-12-15 10:57:56 +01:00
Olivier Goffart 0155a4fa73
Wizard + OAuth: Make opening a new browser after clicking back works again
Issue #6574

When there is an error in the advanced page, OwncloudAdvancedSetupPage::updateStatus
(and others) call completeChanged(), which is connected to
QWizardPrivate::_q_updateButtonStates which will re-enable the back button from the
last page.

When the user click "back" and re-open the browser, the account's credentials
already have a oauth token set. So the call to the API to get a new token fails
because we use the previous token instead of using the client's secret_id.
Fix this with the HttpCredentials::DontAddCredentialsAttribute.

Now, this is still not working because the session cookies are confusing the
server.  So we'll clear the cookies when re-opening the browser
2020-12-15 10:57:55 +01:00
Olivier Goffart 0d21936e95
FolderStatusModel: Fix crash when there is an error while expanding folders
In FolderStatusModel::slotLscolFinishedWithError, the call to parentInfo->resetSubs
deleted the 'job' and the reply 'r' which we accessed later to get the error code.

Fix this problem twice by
 1) Get the error code before caling resetSubs
 2) in FolderStatusModel::SubFolderInfo::resetSubs, call deleteLater instead of delete

Regression introduced in commit d69936e0

Issue #6562
2020-12-15 10:57:55 +01:00
Olivier Goffart 4ee244190b
Virtual Files: Allow to download a folder recursively from the socket API
Issue: #6466
2020-12-15 10:57:54 +01:00
Olivier Goffart 530614bf78
Rename SocketApi::FileData::accountRelativePath to serverRelativePath
As discussed in issue #6552
2020-12-15 10:57:54 +01:00
Olivier Goffart ced5dfb8ee
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
2020-12-15 10:57:54 +01:00
Christian Kamm 97f7b5abeb
Settings migration: Preserve future settings where possible
See discussion in #6506
2020-12-15 10:57:54 +01:00
Christian Kamm 87ba4e6b9c
Config: Add version flags to accounts and folders
Also, if there is too-new configuration, backup the file, show a
warning message asking the user whether it's ok to discard the
configuration from the future.

See #6504
2020-12-15 10:57:53 +01:00
Christian Kamm aa6f5f59c4
Rename Placeholders to Virtual Files in code #6531 2020-12-15 10:57:53 +01:00
Olivier Goffart a877a9d472
SyncRunFileLog: Add the requestid
https://github.com/owncloud/client/pull/6427#issuecomment-383879509
2020-12-15 10:57:53 +01:00
Christian Kamm 7da4bb4c20
Wizard: Add a "(recommended)" to the main option #6470 2020-12-15 10:57:53 +01:00
Christian Kamm ddeeecd061
Rename "placeholder" feature 2020-12-15 10:57:53 +01:00
Christian Kamm 4e3f2f755a
Placeholder: Stop adding ignore pattern
Because we can't make older clients preserve the version directive that
was attached to it.

See #6504 and #6498
2020-12-15 10:57:52 +01:00
Christian Kamm 27b65cbc69
Placeholders: Save to key that's invisible to <2.5 clients #6504 2020-12-15 10:57:52 +01:00
Olivier Goffart 3272f3b72b
FolderWizard: fix crash when experimental feature are disabled
The _placeholderCheckBox only exists if the experimental features are enabled

Found via the crash reporter
https://sentry.io/owncloud/desktop-win-and-mac/issues/556407777/
2020-12-15 10:57:52 +01:00
Markus Goetz 215afba89e
Share Dialog: Disable workaround for macOS too #6185 2020-12-15 10:57:52 +01:00
Markus Goetz 8dcfd50a7d
Placeholders: Support for macOS #6290 2020-12-15 10:57:51 +01:00
Christian Kamm 765c12dae1
LocalDiscoveryTracker: Separate from Folder and move to libsync
To allow relevant code to be closer together and for testing in
unittests without having to get a gui Folder.

See #6120
2020-12-15 10:57:51 +01:00
Christian Kamm 27c8bce0b9
Wizards: Show placeholder option only if showExperimentalOptions is set
This config file option will also control other features in the future.
2020-12-15 10:57:50 +01:00
Christian Kamm aee8b9f3c5
Wizards: Add placeholder option and warning to account wizard
Also add the warning dialog to the option in the folder wizard.
2020-12-15 10:57:50 +01:00
Christian Kamm 7dc65b060d
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.
2020-12-15 10:57:50 +01:00
Christian Kamm 12d6f680f2
Placeholders: Ignore placeholder files in older clients
To do this, we add the placeholder extension to the user exclude file
automatically. However, newer clients shouldn't use that exclude
pattern: so we also add version directives that allow making exclude
patterns dependent on the client version.
2020-12-15 10:57:49 +01:00
Christian Kamm d6078f958b
Placeholders: Download from shell integration 2020-12-15 10:57:49 +01:00
Olivier Goffart 91f53521ae
Placeholder: The extension is now a branding option 2020-12-15 10:57:49 +01:00
Olivier Goffart a2bdd5b9a5
Placeholders: Fixup clicking on placeholder after previous change
Now that the name in the db is the name of the placeholder file,
we need to adjust the call to downloadPlaceholder
2020-12-15 10:57:49 +01:00
Christian Kamm b1de184bc8
Placeholders: Safe migration to older client versions
Now the db entries for placeholders will have the full placeholder
paths. That way older clients will, on remote discovery, delete the
placeholders and download the real files.
2020-12-15 10:57:48 +01:00
Olivier Goffart d233e5f8d7
Placeholders: install mimetype on linux 2020-12-15 10:57:48 +01:00
Olivier Goffart 7eeb99ba24
Placeholders: Add an checkbox in the FolderWizard to enable the placeholder feature 2020-12-15 10:57:48 +01:00
Olivier Goffart 1049fb74d9
Placeholders: Move the placeholder option from the account to the folder 2020-12-15 10:57:48 +01:00
Olivier Goffart 6ce7c7a56b
PlaceHolders: Trigger a download of the placeholder and open it 2020-12-15 10:57:48 +01:00
Kevin Ottens 8c4bd2bb52 Ensure a sync happens after a conflict resolution
You'd expect that after a conflict resolution the file watcher would
pick up the change and trigger a sync. For some reason it doesn't seem
to happen on at least some Ubuntu systems. In such cases the user would
then still have a stale conflict entry in the activity list and wouldn't
be able to do anything with it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 09:40:57 +00:00
Kevin Ottens d640076454 UserModel: check indices are inside the user list
The model was just checking for the user list being empty or not which
is overly optimistic. Indeed there might be cases where the id is
actually outside the boundaries so properly check for this.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 08:43:32 +00:00
Kevin Ottens 5ed397a430
Have the new account wizard open again
UserModel can't be connected to AccountSettings if the settings dialog
doesn't exist. This is the case now since we delay the creation of that
dialog and free it after use.

Instead it should be properly channeled through the Systray object all
the way up to OwncloudGui which knows how to handle this properly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-14 15:58:52 +01:00
Camila b4dc682690
Handle the warning message when unchecking folders for syncing.
Split widgets and slot to handle the refreshing of the view:
- refreshSelectiveSyncStatus is connected to signal dirtyChanged
and will handle big folder warning.
- slotSelectiveSyncChanged  which is connected to dataChanged signal
and will handle the selective sync warning. It fixes #1029 because
it looks for the checkbox state before showing the warning.

Signed-off-by: Camila <hello@camila.codes>
2020-12-14 12:36:51 +01:00
Camila cfbd22b5e7
Use the icon color property to color the icons in the tray window header.
The icon color is set with APPLICATION_WIZARD_HEADER_TITLE_COLOR in the
theme.

Signed-off-by: Camila <hello@camila.codes>
2020-12-10 17:43:45 +01:00
allexzander 9266ecc2e8 Fixed slow sharee search in the share dialog
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-08 13:48:43 +00:00
allexzander 6e8658dc2c Added sharing via email.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-08 11:08:45 +02:00
Camila 5517ff2c02
Add debug log to check which folders are being skipped during syncing.
Signed-off-by: Camila <hello@camila.codes>
2020-12-03 12:24:25 +01:00
allexzander f04281cb69 Implemented notification action buttons and context menu for confirm/dismiss and other actions.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-02 08:08:37 +00:00
Brian Kendall f9991e180c Fix macOS bug where tray window causes spaces to switch
Signed-off-by: Brian Kendall <brian@briankendall.net>
2020-12-02 06:54:16 +00:00
Dominik Schmidt a50c665051
Simplify Sparkle handling in CMake 2020-11-25 09:43:59 +01:00
Chih-Hsuan Yen 6962cbf582
Fix build without Sparkle.framework
(PR #6567)
2020-11-25 09:40:20 +01:00
Christian Kamm 60d3696ccd
Settings: Add warning when switching update channel 2020-11-25 09:39:16 +01:00
Kevin Ottens 4906353f2e Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-24 18:22:33 +00:00
Hannah von Reth 038644f378 Don't scare users with critical parser log messages 2020-11-24 18:22:33 +00:00
Hannah von Reth d30cd0f0fd Include architecture in updater query
Fixes: #8074
2020-11-24 18:22:33 +00:00
Hannah von Reth c76095859a Cleanup stirngs 2020-11-24 18:22:33 +00:00
Olivier Goffart a7f010c370 Updater: Fix crash when there is an XML error
The problem was accessing the lines with an off by one error, while printing
the log.

Other problem included the fact that QDebug added spaces, quotes, and other
things which made the error lot look right in the console.

Issue #7545
2020-11-24 18:22:33 +00:00
Olivier Goffart 1bf895cadc Updater: Fix Version numer not shown in the user visible string
There was one argument too many in the string.
Bug was introduced in commit 21ac396b

Issue: #7288
2020-11-24 18:22:33 +00:00
Christian Kamm c58f00abc7 Updater: Improved logging output #7388 2020-11-24 18:22:33 +00:00
Hannah von Reth 1df3f5b6df NSISUpdater: Improve logging for version comparison 2020-11-24 18:22:33 +00:00
Hannah von Reth 1aca005267 Updater: Log parsing issues in autoupdatLog parsing issues in autoupdatee 2020-11-24 18:22:33 +00:00
Markus Goetz 9a375211d7 Autoupdater: Log the URL #3475 2020-11-24 18:22:33 +00:00
Christian Kamm d2991210c5 Updater: Preserve target version string
For #7217
2020-11-24 18:22:33 +00:00
Christian Kamm aa7409f401 Updater: Make "Update manually" not also "skip this version"
See #7217
2020-11-24 18:22:33 +00:00
Christian Kamm 0b3512f49c WinUpdater: More useful options on update failure #7217
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-24 18:22:33 +00:00
Olivier Goffart 9596eb7f20 Updater: show the human readable version in the settings
The xml looks like this:

   <version>2.5.0.328</version>
   <versionstring>ownCloud Client 2.5.0 alpha1 (build 238)</versionstring>

And we should show the version string

Issue #6602
2020-11-24 18:22:33 +00:00
Olivier Goffart f2c3ef741b Updater: remove unused function 2020-11-24 18:22:33 +00:00
Dominik Schmidt ae38b88d1c Remove unused installers before copying new ones into the appdata dir 2020-11-24 18:22:33 +00:00
Olivier Goffart e93972824d MSI: Fix crash in the auto updater
'auto' here is a QStringBuilder referencing a temporary

Ammend commit 150d4f5935
(MSI: Always with logfile #6609)

Found in the crash reporter:
https://sentry.io/owncloud/desktop-win-and-mac/issues/623245771/
2020-11-24 18:22:33 +00:00
Markus Goetz 5e518419de MSI: Always with logfile #6609 2020-11-24 18:22:33 +00:00
Dominik Schmidt d069fda9ab Extract filename of updateFile without leading slash 2020-11-24 18:22:33 +00:00
Dominik Schmidt dfac8c0e59 Escape msi and owncloud.exe path (who knows...) 2020-11-24 18:22:33 +00:00
Dominik Schmidt ed0dc68db2 Run msi properly and restart client after update 2020-11-24 18:22:33 +00:00
Dominik Schmidt 08b5981fb6 Implement basic .msi support in updater 2020-11-24 18:22:33 +00:00
Markus Goetz 412e43b696 Updater: Comments 2020-11-24 18:22:33 +00:00
Christian Kamm 4b39731c27 Updater: Make sparkle updater respect release channel 2020-11-24 18:22:33 +00:00
Markus Goetz 311e3a3bd8 Auto Updater: Show UI element also on macOS
(cherry picked from commit dfdc2e1e87f99d387a042f4983c999fbb7fcf3d9)
2020-11-24 18:22:33 +00:00
Christian Kamm a8ad946758 Settings: Add update channel combobox #6259 2020-11-24 18:22:33 +00:00
Markus Goetz 65035d1990 Sparkle: Delegate calls work now with 1.18.1 (maybe even before)
We can extend on this to give UI feedback.
2020-11-24 18:22:33 +00:00
Christian Kamm 08014b6dc3 FolderWatcher: Disable test on OSX #7305 2020-11-24 16:56:49 +00:00
Olivier Goffart 5a432a193f FolderWatcher: Usage of QTime for elapsed time is deprecated 2020-11-24 16:56:49 +00:00
Christian Kamm 28e4fc54a1 FolderWatcher: Wait for ready before testing #7305 2020-11-24 16:56:49 +00:00
Christian Kamm e97fc430bf FolderWatcher: Become unreliable if test notification fails #7241
Necessary for some filesystems on windows that don't have full file
watching capabilities.
2020-11-24 16:56:49 +00:00
Christian Kamm 74382ddcc0 FolderWatcher linux: Make automatically recursive #7068
Previously it depended on addFolder() / removeFolder() calls to adjust
watchers when new folders were added or removed. There also needed to be
complex move handling.

Now, any folder creation/move-in notifications automatically trigger
watcher additions and folder deletion/move-out triggers removal.
2020-11-24 16:56:49 +00:00
Christian Kamm 21b931dc6b FolderWatcher: Always notify about conflict files #7073
This makes sure that the conflict list can be updated if a user resolves
a conflict by deleting the local conflict file. Previously one had to
wait for the next sync run.
2020-11-24 16:56:49 +00:00
Christian Kamm 351bada552 Folderwatcher: On linux, fix paths after dir renames #6808
If a folder was renamed A -> B, the folder watcher for the inode
would be unaware and still report changes for A/foo. Now directory
renames in the watched folders are tracked and paths are updated
accordingly.
2020-11-24 16:56:49 +00:00
Kevin Ottens 922b322337 Enable the QML debugger on debug builds
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-23 17:39:50 +00:00
allexzander 665a8c4217 Use dynamic path for account online/offline state icon. Refresh GUI on connection state change.
Signed-off-by: Alex Zolotov <alex.zolotov.nextcloud.com>
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-11-23 17:49:25 +02:00
Kevin Ottens 4f7876f520 Migrate journal dbs files back to the sync folder
In case of past collisions during the 3.0 times... well one will resync
from scratch unfortunately. But if that happened there are likely other
problems which occurred.

Also this might fix some of the bugs with people loosing settings from
the database. Indeed the -wal and -shm concatenations were wrong. Using
append was in fact changing the folderDefinition member which (I guess)
would potentially lead to funny ".db-wal-shm-wal-shm" names.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Kevin Ottens 0b731eb516 Revert "moved default db sync file to Qt standard path AppDataLocation"
This reverts commit fc6b895f52.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Kevin Ottens 6c463442ef Bring back the pause/resume action in the systray menu
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:29:51 +00:00
Kevin Ottens 1288ee0437 Move pause/unpause helpers to Systray
We had signals just to call those backs in ownCloudGui, they were
otherwise unused. So let's move them inside of Systray since it's
specific to it anyway.

Also fix the dangerous call to sender(). We can call this function
without going through a signal/slot connection and also it's never
connected to an AccountState.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:29:51 +00:00
Kevin Ottens 95487d8bfc Make sure the settings dialog exist before hiding it
Because of PR #2580 the settings dialog doesn't always exist. We need to
check for it first before placing calls to it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 16:57:56 +00:00